What is the real benefit of using a UUID? Is it faster, more reliable, easier to remember (ha lol no), what?
Here is a real life example of why you should be using UUIDs instead of /dev/XXX
when mounting in fstab
. (So yes, it is more reliable as the UUID won't change when a drive from the chain is out.)
The other well known real life situation where UUIDs come handy is at booting to identify the device which you want to boot in GRUB. Because without the UUID the drive numbering scheme is dependent on the BIOS boot-order and changing the boot-order in the BIOS can cause problems. (Say you were booting from a SATA drive, then you plugged in an ATA drive and changed the boot-order to first boot the ATA. After that you fromat the ATA drive (which is now not bootable) but not revert the boot-order. Your BIOS will boot the SATA drive as the ATA drive is not bootable but is is totally possibly that GRUB now won't find your drive if you aren't using UUIDs.) This is written in the GRUB's manual too here.
And, isn't it possible to change a UUID?
Yes you can change the UUIDs, but this doesn't defeat the purpose of the UUID. The purpose of the UUID is to be constant across reboots and across machines no matter what is the machine's setup or where you plug in the drive. The purpose is not that to give your drive an unchangeable name for its lifetime.
Is there a way to identify a drive (especially in GRUB) that can never change?
Technically for some of the drives it possible to identify them in a way that can never change as the drives have a World Wide Name and/or a serial number. Normally these values are not changeable and they are unique to the drive. (Technically it might be possible to change these values too.) You can view such info about your drive with e.g. sudo hdparm -I /dev/sda
. (Likely that the mass manufactured cheap or not cheap USB pendrives/memory cards doesn't always have such identification.)
But these unique identifiers are for the drive and for the OS and for you the more important is a unique identifier for the partition, thats what the UUID is for. And since partitions are changeable on a drive of course the UUIDs are changeable too.