I am using Arch Linux. I have three functioning RAID arrays via MDADM:
~ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=beast:0 UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e
ARRAY /dev/md1 metadata=1.2 name=beast:1 UUID=7559b085:3b4715cc:59205fdd:12c0db08
ARRAY /dev/md2 metadata=1.2 name=beast:2 UUID=2dddbf33:26249617:ef8f8b65:c9670bdb
I have three directories in /run/media
that I try to automount these mdadm arrays via fstab:
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
/dev/md0 /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=7559b085:3b4715cc:59205fdd:12c0db08 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md1 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=2dddbf33:26249617:ef8f8b65:c9670bdb /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md2 /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
Using the commented out UUID lines, automount does not work. I see the drive as 'active but not mounted' in webmin, but am required to mount it, and enter my password, then the drive mounts. However, with the /dev/,,,
lines, automount works, no password required.
What gives? I've been told to ALWAYS fstab with UUIDs and never device names so I want to fix this.
Best Answer
The
UUID
seen inmdadm.conf
are related to the MD drivers.The
UUID
used infstab
are related to filesytems.What you need are the filesystem UUID numbers. You can get them with a command line
So in my case:
So we can see the UUID used is the filesystem UUID and not the MD UUID.