0

I've watched DebConf 14: QA with Linus Torvalds, and at about 19:50 Linux mentions how "UUIDs are crazy sh!t."

What are UUIDs used for (at the kernel level)? What does Linus mean by this?

  • I can just think of GPT partitions. – phk Oct 27 '16 at 22:58
2

FIlesystems, when they are formatted, are given a random number to uniquely identify them. In the old days, you had to configure your boot loader and /etc/fstab to identify which filesystems should be mounted where using a dev node, which consists of an arbitrarily assigned ID, like /dev/sda, and a partition number. The problem with that was that if your partition numbers changed, all of those existing references broke. The really big problem came though when the arbitrary IDs for the disks themselves started to change quite frequently. With IDE disks there could only be 4, and so depending on which physical port you had the drive connected to, that would determine whether it was /dev/hda or /dev/hdb. With SCSI disks, or SATA disks, or systems with multiple disk controllers though, the ID is simply assigned in the order they are detected in, and this order is somewhat random and subject to change from one boot to the next, even if you don't do something like (un)plug a USB disk. As such systems became popular, it became important to not have to rely on the dev node names and so systems switched to using UUIDs to identify what filesystem should be mounted where, and whatever dev node it happens to show up as on a given boot doesn't matter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.