Hard Disk device IDs in Linux
torriem at gmail.com
Fri Mar 8 08:49:46 MST 2013
On 03/07/2013 10:31 PM, Dan Egli wrote:
> How does Linux handle device IDs for hard disks in excess of 26? I know
> the first hard disk is /dev/sda, the second is /dev/sdb, and so forth. But
> the English alphabet is only 26 letters. That means that hard disk 26 would
> be /dev/sdz. What about any more than that, as might be found in some of
> the larger rack mount servers in the 7U and 8U size range? They have 28 and
> 32 drives respectively (usually, I know some have more or less, but that's
> a good average). Does Linux simply fail to address anything above drive
> #26? Or does it move to capital letters (i.e. /dev/sdA)? Or perhaps it's
> double letters (/dev/sdaa)?
Is there a way to configure your e-mail client not to put all those
extra stars in your messages?
The Linux kernel is completely agnostic to the scheme you use in
identifying drives. Remember that in Unix everything is a file. So each
block node in /dev is just a special file. All that really matters to
the kernel is the major and minor numbers on that file. For example
what your distro and my distro might call /dev/sda is probably major
number 8, minor number 0. You can look at /proc/devices to get a list
of major numbers for different device classes.
Anyway, what the device nodes are is completely up to the distro. When
I managed RH servers connected to a big san, we didn't use
/dev/sda-style notation at all. Instead we used /dev/disk/by-id/ nodes.
This way even if the disks moved to a new chassis, they'd still be
found. We did find, though, that the RAID chassis itself would create
these ids, and when you moved a RAID set to a new chassis, the disk ids
would change. But it was much better than using /dev/sda and the like,
which could change order at boot, depending on how fast the arrays
responded and were enumerated by udev.
More information about the PLUG