Mounting issues in Ubuntu

Mars

Honorary Master
Joined
Feb 4, 2006
Messages
11,452
Reaction score
1,149
Location
Cape Town
I decided to change my media server to linux. I'm using Ubuntu 12.04.

Its just about done, I have SABnzbd, sickbeard, couchspud and plex running. I think I have them running at startup too, but I still need further testing on this.

My issue is with the mounting of the drives. I cannot understand why the process is so fikin unnecesarily complex. I also cannot understand why there is not a process to mount the damn drives on boot built into ubuntu?

Anyway. First I tried pysdm. It fsked up my fat table good ans solid. it was mounting multiple drives into the same folder and no matter what I did if I changed one the other changed too. I uninstalled it. Fortunately I backed up the fstab before I started and I just restored that and started again.
Now I'm using AriOS Automount. It seems to not give a flying fsk which drives it mounts into which folders. The result is that plex cannot ever find the media.

Please can someone explain to me what I need to do to get these drives mounted into their folders on boot?
 
I will suggest start by manually adding them into /etc/fstab after manually creating folders for them. That way you know what to expect after each boot.
 
I will suggest start by manually adding them into /etc/fstab after manually creating folders for them. That way you know what to expect after each boot.

Ok I this is what I did.

I swapped all the drives around:
a-e <-> o-z
t2b <-> kmg
f-k <-> l-n
movies <-> t4

From this:
Code:
/dev/sdc1                                  /media/moviesold  ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdb1                                  /media/downloads  ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sde1                                  /media/l-n        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdd1                                  /media/2tb        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdf1                                  /media/a-e        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdg1                                  /media/t4         ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdh1                                  /media/kmg        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdi1                                  /media/f-k        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdj1                                  /media/o-z        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdk1                                  /media/movies     ntfs  nls=iso8859-1,users,umask=000,user  0  0

to this

Code:
/dev/sdc1                                  /media/moviesold  ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdb1                                  /media/downloads  ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sde1                                  /media/f-k        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdd1                                  /media/kmg        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdf1                                  /media/o-z        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdg1                                  /media/movies     ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdh1                                  /media/2tb        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdi1                                  /media/l-n        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdj1                                  /media/a-e        ntfs  nls=iso8859-1,users,umask=000,user  0  0  
/dev/sdk1                                  /media/t4         ntfs  nls=iso8859-1,users,umask=000,user  0  0

I unmounted all the drives before editing and saving. On restart they are still in the incorrect folders.
 
No expert here, but my understanding is that the drives can be randomly assigned to whichever /dev/sd?? is available at boot, so it won't be the same each time. Better to use UUIDs.

From the fstab file: "Use 'blkid -o value -s UUID' to print the universally unique identifier for a device; this may be used with UUID= as a more robust way to name devices that works even if disks are added and removed."
 
No expert here, but my understanding is that the drives can be randomly assigned to whichever /dev/sd?? is available at boot, so it won't be the same each time. Better to use UUIDs.

From the fstab file: "Use 'blkid -o value -s UUID' to print the universally unique identifier for a device; this may be used with UUID= as a more robust way to name devices that works even if disks are added and removed."

Thank you kindly. That worked. I had no idea that the /dev/sd?? was random.
 
Thank you kindly. That worked. I had no idea that the /dev/sd?? was random.

I learned that a long time ago and learned it the hard way! I needed to dd one 500gb drive to another, after getting the device identifiers with fdisk i wrote them down so i dont fsckup. i then had to go out for a while and shut the box down, on my return i booted up and ran dd with the details i wrote down, bye bye 500gb backup drive with all my photos etc, now to have two blank drives as the drive numbers swapped at boot. i cried a bit i think :D
 
Why don't you mount by ID to stop them moving around?

e.g.

ls /dev/disk/by-id/ | grep scsi
scsi-SATA_ST2000VX000-1CU_W241KLLC
scsi-SATA_ST2000VX000-1CU_W241KLMM
scsi-SATA_ST2000VX000-1CU_Z1E4HJJX
scsi-SATA_ST2000VX000-1CU_Z1E4HJKX
scsi-SATA_ST2000VX000-1CU_Z1E4HLRD

and mount with those labels.

e.g. /dev/disk/by-id/scsi-SATA_ST2000VX000-1CU_W241KLLC

I do this for all my ZFS stuff so I know which drive to replace when its busted (as serial on system is serial on drive) and so that my NAS can't randomly change drive order on reboot if another device is added.
 
Last edited:
Why don't you mount by ID to stop them moving around?

e.g.

ls /dev/disk/by-id/ | grep scsi
scsi-SATA_ST2000VX000-1CU_W241KLLC
scsi-SATA_ST2000VX000-1CU_W241KLMM
scsi-SATA_ST2000VX000-1CU_Z1E4HJJX
scsi-SATA_ST2000VX000-1CU_Z1E4HJKX
scsi-SATA_ST2000VX000-1CU_Z1E4HLRD

and mount with those labels.

e.g. /dev/disk/by-id/scsi-SATA_ST2000VX000-1CU_W241KLLC

I do this for all my ZFS stuff so I know which drive to replace when its busted (as serial on system is serial on drive) and so that my NAS can't randomly change drive order on reboot if another device is added.

I like that very much!
Thanks for the tip.

The functionality in ubuntu is awesome, I just wish i knew more.
 
Physical ports dont change device name often and normally follow the number sequence on the board i.e sata port1 is normally /dev/sda but it does change depending on initialization etc sometimes.
Mounting on ID or UUID works most reliably.
 
Top
Sign up to the MyBroadband newsletter
X