Hard disk device name
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.
In current Debian versions
The disk naming has changed in newer 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.
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
Hard disk naming
- Dodin, Jean-Daniel (Revision V0.1, 2009): “Partitions-Mass-Storage-Definitions-Naming-HOWTO”. Chapter 5: “Drive Naming in Linux”
https://www.tldp.org/HOWTO/Partition-Mass-Storage-Definitions-Naming-HOWTO/x99.html The Linux Documentation Project
- Unnikrishnan: “Udev: Introduction to Device Management In Modern Linux System”
https://www.linux.com/news/udev-introduction-device-management-modern-linux-system Published in 2009 on Linux.com
hdparm(8) manpage in Debian Stretch from 2017