Linux – in which cases it will be problematic to configure UUID in fstab

diskfstablinuxraiduuid

We are thinking about to change all Linux fstab configuration to work with UUID instead the current configuration

Some of the disks are with non RAID and some of the disks are with RAID10

I searched in google and find complain about using UUID for RAID1 :

" Unfortunately you MUST NOT use UUID in /etc/fstab if you use software RAID1. Why? Because the RAID volume itself and the first element of the mirror will appear to have the same filesystem UUID. If the mirror breaks or for any other reason the md device isn't started at boot, the system will mount any random underlying disk instead, clobbering your mirror. Then you'll need a full resync. Bad juju."

So I just want to know if we can use UUID for RAID10 ?

and in which cases ( RAID configuration ) not to use UUID?

second – in few lines what are the benefit to use UUID ?

Best Answer

Answer to your second question: an UUID allows you to uniquely identify a device.

Devices are assigned as /dev/sda, /dev/sdb, etc. depending on the order the system discovers them. While the drive the system boots on is always the first, for the others their name assignment depends on the order of discovery and might change after a reboot.

Also, imagine you have drives /dev/sdc and /dev/sdd, and you physically remove the first drive; after reboot, what was known as /dev/sdd is now called /dev/sdc.

This makes identification of devices ambiguous. UUIDs avoid all ambiguity; as the UUID is stored in the superblock (for a block device), it pertains to the device itself.

Related Question