[Discuss] Disk numbering
Bill Bogstad
bogstad at pobox.com
Wed Oct 5 12:25:23 EDT 2011
This isn't a reply to any particular message on this thread, but I
haven't seen anyone mention the /dev/disk directory yet. On my
Ubuntu systems, it contains subdirectories by-uuid, by-label,
by-path, etc. Those sub-directories contain symlinks to the more
traditional sd or mapper names for drives. I assume this is done by
udev or something so it might not be usable in early boot scripts, but
it can certainly be used for anything run after the system is fully
booted. Admittedly, those symlinks are relative which makes things
ugly, but readlink solves that problem. For example,
readlink -e /dev/disk/by-label/os_part
returns
/dev/sda6
on one of my systems.
Judicious labeling of the partitions with human recognizable names is
in my opinion even better then static sd* names.
This doesn't solve the problem of actually figuring out which physical
drive is actually sda vs sdc. I've been forced to eject CD drives (in
systems with more then one), force artificially high IO rates (using
per-drive activity LEDs), or seek rates (detected by vibration) to do
so in the past. There is a possibility that the by-path subdirectory
(which refers to buses/slots) might help in this regard, but I don't
have any experience to confirm this.
Bill Bogstad
More information about the Discuss
mailing list