This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
how_to_use_a_usb_drive_for_storage [2016/06/10 01:01] ron created |
how_to_use_a_usb_drive_for_storage [2016/06/10 01:21] ron |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | |||
- | NOV AUG SEP | ||
- | 1 | ||
- | 2012 2014 2015 | ||
- | 3 captures | ||
- | 17 Nov 12 - 1 Aug 14 | ||
- | |||
- | CloseHelp | ||
- | Jump to Content | ||
=====How To Use a USB Drive For The VortexBox Media Library===== | =====How To Use a USB Drive For The VortexBox Media Library===== | ||
Line 14: | Line 4: | ||
1. Prepare your USB drive. VortexBox media are in /storage: | 1. Prepare your USB drive. VortexBox media are in /storage: | ||
+ | <code> | ||
Audio: /storage/music | Audio: /storage/music | ||
LMS music library: /storage/music/flac | LMS music library: /storage/music/flac | ||
Line 21: | Line 11: | ||
Images: /storage/pictures | Images: /storage/pictures | ||
Video: /storage/movies | Video: /storage/movies | ||
+ | </code> | ||
- | 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. | + | 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. | 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 Login. | + | 3. Login to your VB; see [[VortexBox Command Line]] |
4. Find the device name of the USB drive. Enter | 4. Find the device name of the USB drive. Enter | ||
- | cat /etc/vortexbox/CurrentUsbDrive.txt | + | <code>cat /etc/vortexbox/CurrentUsbDrive.txt</code> |
On a VB with one internal hard drive, this usually shows /dev/sdb. | On a VB with one internal hard drive, this usually shows /dev/sdb. | ||
5. Mount the drive. Enter | 5. Mount the drive. Enter | ||
+ | <code> | ||
umount /storage | umount /storage | ||
mount /dev/sdb1 /storage | mount /dev/sdb1 /storage | ||
+ | </code> | ||
- | Use the device name from step 3 with a "1" appended in the above command if it's not /dev/sdb. | + | **Use the device name from step 3 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 | 6. If this works, then automount the drive at boot time. Edit /etc/fstab. Enter | ||
- | nano /etc/fstab | + | <code>nano /etc/fstab</code> |
7. Remove any line that currently mounts /storage. This line may look like | 7. Remove any line that currently mounts /storage. This line may look like | ||
- | /dev/mapper/VolGroup-lv_storage /storage ext4 defaults 1 2 | + | <code>/dev/mapper/VolGroup-lv_storage /storage ext4 defaults 1 2</code> |
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. | 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 | 8. Add the line | ||
- | /dev/sdb1 /storage ntfs defaults 0 0 | + | <code>/dev/sdb1 /storage ntfs defaults 0 0</code> |
- | 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. | + | **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). | 9. Write the file (control-o) and quit (control-x). | ||
10. Test the /etc/fstab entry by entering | 10. Test the /etc/fstab entry by entering | ||
+ | <code> | ||
umount /storage | umount /storage | ||
mount -a | mount -a | ||
+ | </code> | ||
This should mount the USB drive at /storage. | This should mount the USB drive at /storage. | ||
- | 11. If step 9 is successful, the USB drive will be automounted at /storage when the VB reboots. | + | 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 | 12. If you want the proper drive to be automounted regardless of the device name, enter the command | ||
- | blkid /dev/sdb1 | + | <code>blkid /dev/sdb1</code> |
- | Use the correct device name in the above command if it's not /dev/sdb1. | + | **Use the correct device name in the above command if it's not /dev/sdb1.** |
On my VortexBox, this returns | On my VortexBox, this returns | ||
- | /dev/sdb1: UUID="725A66165AF23401" TYPE="ntfs" | + | <code>/dev/sdb1: UUID="725A66165AF23401" TYPE="ntfs"</code> |
- | 13. You can then change the step 7 line in /etc/fstab to | + | 13. You can then change the step 8 line in /etc/fstab to |
- | UUID="725A66165AF23401" /storage ntfs defaults 0 0 | + | <code>UUID="725A66165AF23401" /storage ntfs defaults 0 0</code> |
- | Use the UUID returned by the blkid command on your system. | + | 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: | 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 | + | <code>chown squeezeboxserver:squeezeboxserver /storage/music/playlist</code> |