Local Music Library Or USB Hard Drive

# using a local music library is very easy, simply add all your music inside /mnt/media, this folder is shared on the local network and is also available from host \\MUSICLOUNGE\music (read the SAMBA configuration for more info)

# using an external USB hard drive for your music library is also easy but the disk must be powered (even an SSD) with an external adapter.

# so make sure the usb hard drive is powered with an external adapter and plug the usb cable on the server board (rPI 4 or C4 or Pc),

Install exFAT File System

# exFAT file system is not installed by default on all distributions and you may need it
# to install exFAT do the following:

  1. $ sudo apt-get install exfat-fuse
  2. $ sudo apt-get install exfat-utils
  3. $ sudo reboot

Configuration

# start to list disks attached to find where is located

  1. $ sudo fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 63 1953520064 1953520002 931.5G 7 HPFS/NTFS/exFAT

# /dev/sda1 is our usb hard drive location


# now get its UUID and file system

  1. $ sudo blkid
/dev/sda1: LABEL="SAMSGBKUP" UUID="9A2B-8FC2" TYPE="exfat" PARTUUID="5b0a6a10-01"

# here we have 9A2B-8FC2 as UUID and exfat file system

Auto-Mounting Drive

# normally if the MusicLounge audiophile server is correctly installed the /mnt/media directory is already there, check this:

  1. $ ls /mnt/media

# creates the directory if needed:

  1. $ sudo mkdir /mnt/media

# edit fstab to mount the disk at startup

  1. $ sudo nano /etc/fstab

# add this line WITH YOUR UUID and correct file system

# comment with # prefix any other line with /mnt/media)

UUID=9A2B-8FC2 /mnt/media exfat defaults,auto,umask=000,users,rw 0 0

# CTRL + X and Y to save

# before rebooting it’s important to test your fstab configuration

  1. $ sudo mount -a

# edit and check fstab configuration again if the command return an error

# reboot

  1. $ sudo reboot

# check your music library

  1. $ ls /mnt/media

Update MPD Database

# to update database use your favorite MPD client (MALP or DroidMyMPD or myMPD on your web browser) or open SSH session and type:

  1. $ mpc update

# that’s it!
# your music library is now on local disk

Tips

# to mount an exFat hard dive manually

  1. $ sudo mount -t exfat /dev/sda1 /mnt/media

# to unmount

  1. $ sudo umount -f /mnt/media