08-Aug-2016, 08:17 PM
Introduction
The Snakeoil Web app allows you to easily mount partitions, but there are occasions where this system will not work well, e.g. if you are using USB storage and the device names are different for every boot. To overcome this issue, you'd need to mount the partitions the old Linux way.
Step One
Remove all mount points in the web app. Go to the music tab, and look under the section Mount Points. If you see any entries, note the media paths (e.g. /dev/sdb1, /dev/sdc1). Once noted, click the associated remove button and remove all entries.
Click Save Changes. The partitions would be unmounted.
Step Two
Login to your Snakeoil via SSH. Refer to the Logging in/SSH section of the manual if you havn't done this before. Once logged in, you will see something like this:
Step Three
Now comes the more difficult part. You'd need to find the UUID of the storage in question, use the blkid command. To find the UUID of /dev/sdb1, run this command:
And you would see something like this:
Note the fields UUID and TYPE. The UUID field above is an example only, your storage device will be unique and is different.
Step Three
Make a backup of this file /etc/fstab by running the following command:
Step Four
Modify /etc/fstab file by running the following command:
Enter your login password when prompted to do so.
Step Five
Now start adding the partitions. Go to the last line, and add your entry based on output from blkid, as the example from above, the entry would look like so:
If the partition is using EXT4, it will look something like so:
Repeat Step 3 to add all your other block devices, and make sure they are mounted under different sub-folders under /media/music.
Once you have entered all the entries, save the file by pressing CTRL-X, and when prompted, press Y for Yes.
Step Six
Make sure you have created all the mount points you specified in Step Five are present, as an example:
and if you add more than one storage devices, make sure you created the folders too, e.g.
and so on.
Step Seven
Reboot the Snakeoil machine. Then load the Snakeoil Web app, click the music tab and look at the File System table, you should see your storage devices mounted under /media/music now. And the mappings will be fixed now because you are using UUID.
The Snakeoil Web app allows you to easily mount partitions, but there are occasions where this system will not work well, e.g. if you are using USB storage and the device names are different for every boot. To overcome this issue, you'd need to mount the partitions the old Linux way.
Step One
Remove all mount points in the web app. Go to the music tab, and look under the section Mount Points. If you see any entries, note the media paths (e.g. /dev/sdb1, /dev/sdc1). Once noted, click the associated remove button and remove all entries.
Click Save Changes. The partitions would be unmounted.
Step Two
Login to your Snakeoil via SSH. Refer to the Logging in/SSH section of the manual if you havn't done this before. Once logged in, you will see something like this:
Step Three
Now comes the more difficult part. You'd need to find the UUID of the storage in question, use the blkid command. To find the UUID of /dev/sdb1, run this command:
Code:
blkid /dev/sdb1
And you would see something like this:
Code:
/dev/sdb1: UUID="7FAEFE6123DEFABE" TYPE="ntfs"
Note the fields UUID and TYPE. The UUID field above is an example only, your storage device will be unique and is different.
Step Three
Make a backup of this file /etc/fstab by running the following command:
Code:
cp /etc/fstab ~/fstab.orig
Step Four
Modify /etc/fstab file by running the following command:
Code:
sudo nano /etc/fstab
Step Five
Now start adding the partitions. Go to the last line, and add your entry based on output from blkid, as the example from above, the entry would look like so:
Code:
UUID=7FAEFE6123DEFABE /media/music/sdb ntfs defaults 0 0
If the partition is using EXT4, it will look something like so:
Code:
UUID=7FAEFE6123DEFABE /media/music/sdb ext4 defaults 0 0
Repeat Step 3 to add all your other block devices, and make sure they are mounted under different sub-folders under /media/music.
Once you have entered all the entries, save the file by pressing CTRL-X, and when prompted, press Y for Yes.
Step Six
Make sure you have created all the mount points you specified in Step Five are present, as an example:
Code:
sudo mkdir /media/music/sdb
and if you add more than one storage devices, make sure you created the folders too, e.g.
Code:
sudo mkdir /media/music/sdc
and so on.
Step Seven
Reboot the Snakeoil machine. Then load the Snakeoil Web app, click the music tab and look at the File System table, you should see your storage devices mounted under /media/music now. And the mappings will be fixed now because you are using UUID.