Translation(s): English - Français - Italiano - Brazilian Portuguese - Русский

Hard disk device name

In current Debian versions

The disk naming has changed in recent versions of Debian. Today (e.g. in Stretch) all disks - no matter if (S)ATA or SCSI - are called /dev/sda, /dev/sdb and so on. It seems to be like this because the libata library emulates an SCSI disk for each ATA disk.

It is still posible to influence the naming by the use of udev rules, see below.

In Debian Lenny

The disks are named according to rules defined in /etc/udev/rules.d

The default udev rules define the following naming:

If you have IDE Hard disks:

 /dev/hda is IDE primary master (equivalent to c: in Windows)
 /dev/hdb is IDE primary slave (equivalent to d: and so on)

The exception is if you have a CDROM or DVDROMs attached to the first IDE controller, those could be named as /dev/hda.

If your hard disk is attached to a second IDE controller, it will be named /dev/hdc or /dev/hdd as follows:

 /dev/hdc is IDE secondary master
 /dev/hdd is IDE secondary slave

Nowadays, with SATA controllers, the drive may be named as /dev/hde, /dev/hdf etc. Sometimes the IDE disks are /dev/sda (eg SiI RAID capable controller).

If you have SCSI hard disks, Linux names them as /dev/sda, /dev/sdb etc.

Influence hard disk naming

Disk naming is done by udev.

You can define udev rules of your own to achieve completely different naming, for example persistent disk names according to disk bay position.

Working with drive parameters

hdparm is a tool for query and adjustment of settings for SATA and IDE drives. For example you can define the idle time after which a hard disk switches off the motor.

Testing a Harddisk

See also

References

Hard disk naming

Udev

Hdparm


CategoryHardware | CategoryStorage