Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple server with 6 hard disk drives (all SATA) inside of it. They are in a simple JBOD (just a bunch of disks) mode, so Linux just shows the following devices (assume each one has a single ext2 partition).


Now, if I were to swap two of the disks by accident during routine maintenance, the mappings between device name (ie: /dev/sdx) and the actual disk being name is swapped.

Is there a way to have fstab require additional arguments (ie: some sort of VOLUME/DISK UUID, or some kind of drive serial number) so that I can enforce a device-name-to-physical-device mapping that does not change if the drives are incorrectly wired inside the server?

Thank you.

share|improve this question
up vote 5 down vote accepted

Absolutely. If your partitions have a label (via e.g. e2label) then you can use LABEL=xxxx, otherwise you can use UUID=xxxx after getting the UUIDs with blkid.

share|improve this answer
@Izzy Both answers were great, but this one showed me how to get the label/UUID as well. Thank you both (@Izzy & @Ignacio) – DevNull Jul 5 '12 at 13:11

Instead of /dev/sdX you can use UID= as in this example:

UUID=81658fcf-1777-457a-934e-5d9a399fdf26 /  ext4  errors=remount-ro   0   1

Then the order of devices should no longer matter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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