How are disks named in linux – HP Linux Server Management Software User Manual
Page 19
How are disks named in Linux?
IDE disks are named /dev/hd
0, and ‘b’ is the slave on that channel. Disk ‘c’ is the master on IDE channel 1, and ‘d’ is the slave on that
channel. IDE disks are not necessarily consecutive. That is, if you do not have a slave device on channel 0,
disk w/ ID hdb is simply skipped.
SCSI disks are named /dev/sd
controller, then by number on the bus. Disk ‘a’ is the lowest SCSI ID on the first controller, ‘b’ is the next
lowest, and so on.
As each driver is initialized, it registers all the disks on the controllers it supports. When a disk is registered,
it is assigned the next drive name in order. A single driver may support multiple controllers, and the order
in which it discovers controllers is driver-dependent. For example, the sym53c8xx driver in stock Linux
kernels looks for all 875 controllers, then all 896 controllers, then all 1010 controllers.
Similarly, if you have two controllers with two disks each supported by the sym53c8xx driver, and one
controller with three disks supported by the mptscsih driver, disk naming will depend on the order in which
the drivers are loaded. If the sym53c8xx driver is loaded first, sda and sdb will be on one controller, while
sdc and sdd will be on the other. The disks on the mptscsih-supported controllers will be sde, sdf and sdg.
By loading the drivers in the opposite order, you will have sda, sdb, and sdc on the mptscsih-supported
controller, and your remaining disks will be sdd, sde, sdf and sdg. In the latter example, if you add a disk
to your mptscsih-supported controller, it will cause sdd to be registered by the mptscsih driver, and the
disks on your sym53c8xx controller will be renamed sde, sdf, sdg and sdh.
Smart Array devices are named /dev/cciss/c0d0p0, where “c” is the controller number, “d” is the virtual
drive number corresponding to a volume configured on the controller, and “p” stands for the partition number.
How are disks named in Linux?
19