User Tools

Site Tools


how_to_use_a_usb_drive_for_storage

How To Use a USB Drive For The VortexBox Media Library

Here are instructions for using a USB drive for your VortexBox media library. These instructions should work on both VortexBox 2.3 (Fedora 20) and VortexBox 2.4 (Fedora 23).

1. Prepare your USB drive. VortexBox media are in /storage:

Audio: /storage/music
LMS music library: /storage/music/flac
LMS playlists: /storage/music/playlist
Mirrored mp3 files: /storage/music/mp3
Images: /storage/pictures
Video: /storage/movies

To use an external USB drive for your VortexBox media, you'll have to create top-level folders music, pictures, and movies on the USB drive. You should also create a music/flac folder on your USB drive, and place your music files there (even if they are not FLAC files). Also create a music/playlist folder for LMS playlists. Create a music/mp3 folder for VortexBox to use for mirroring FLAC files to mp3. Do not place any music files in music/mp3; place them in music/flac. Move your media files on the USB drive to the appropriate folders. This will allow you to mount the USB drive at /storage and have all your media show up in the proper place.

2. Remove all other USB drives (e.g. a backup drive) from your VB. Plug the desired USB drive into your VB.

3. Login to your VB; see VortexBox Command Line

4. Find the device name of the USB drive. Enter

cat /etc/vortexbox/CurrentUsbDrive.txt

On a VB with one internal hard drive, this usually shows /dev/sdb.

5. Mount the drive. Enter

umount /storage
mount /dev/sdb1 /storage

Use the device name from step 4 with a “1” appended in the above command if it's not /dev/sdb.

6. If this works, then automount the drive at boot time. Edit /etc/fstab. Enter

nano /etc/fstab

7. Remove any line that currently mounts /storage. This line may look like

/dev/mapper/VolGroup-lv_storage /storage ext4 defaults 1 2

If you installed VortexBox 2.3 using the “Small 2GB+ install” option, this line won't appear in /etc/fstab; just go on to the next step.

8. Add the line

/dev/sdb1  /storage  ntfs  defaults 0 0

Use the correct device name if it's not /dev/sdb1. This presumes the drive has a NTFS filesystem on it. If not, use the correct filesystem type in the above line.

9. Write the file (control-o) and quit (control-x).

10. Test the /etc/fstab entry by entering

umount /storage
mount -a

This should mount the USB drive at /storage.

11. If step 10 is successful, the USB drive will be automounted at /storage when the VB reboots.

12. If you want the proper drive to be automounted regardless of the device name, enter the command

blkid /dev/sdb1

Use the correct device name in the above command if it's not /dev/sdb1.

On my VortexBox, this returns

/dev/sdb1: UUID="725A66165AF23401"  TYPE="ntfs"

13. You can then change the step 8 line in /etc/fstab to

UUID="725A66165AF23401" /storage ntfs defaults 0 0

Use the UUID returned by the blkid command on your system.

14. After you have mounted the USB drive at /storage, change ownership of /storage/music/playlist so it can be written by Logitech Media Server:

chown squeezeboxserver:squeezeboxserver /storage/music/playlist
how_to_use_a_usb_drive_for_storage.txt · Last modified: 2016/06/10 04:17 by ron