I use lspci
for pci devices and lsusb
to list the usb hardware devices, is there something similar to list my SATA HDD model ?

- 11,703
5 Answers
You can use hdparm to retrieve information about your hard drives, eg.,
hdparm -I /dev/sda
Where I
, according to the man
page:
-I Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i option.
For SCSI drives, use sdparm.

- 73,126
hdparm
usually with the -i
or -I
options should give you rather exhaustive information.

- 30,838
I know you've already accepted an answer but I thought I'd add something for posterity:
If you need to know what block devices are seen by the kernel /sys/block/*
will have the listing. You'll have to sift through that list to filter out the virtual devices that just present to the system as block devices.
Most modern distributions will also list the devices by their path (for example, if they're SAN, which HBA and what the WWPN they're coming from, etc) if you do ls -l /dev/disk/by-path
:
[root@dfletcher ~]# ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:1:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:1:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:2:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jan 27 17:17 pci-0000:01:00.0-scsi-0:2:2:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.0-fc-0x500601663ee0025f:0x0000000000000000 -> ../../sdd
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.0-fc-0x500601663ee0025f:0x0015000000000000 -> ../../sde
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.0-fc-0x5006016e3ee0025f:0x0000000000000000 -> ../../sdf
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.0-fc-0x5006016e3ee0025f:0x0015000000000000 -> ../../sdg
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.1-fc-0x500601653ee0025f:0x0000000000000000 -> ../../sdh
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.1-fc-0x500601653ee0025f:0x0015000000000000 -> ../../sdi
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.1-fc-0x5006016d3ee0025f:0x0000000000000000 -> ../../sdj
lrwxrwxrwx 1 root root 9 Jan 27 17:17 pci-0000:1a:00.1-fc-0x5006016d3ee0025f:0x0015000000000000 -> ../../sdk
[root@dfletcher ~]#
In the last line pci-0000:1a:00.1-fc-0x5006016d3ee0025f:0x001500000000000
can be read left to right as: coming off the pci
bus, from device at PCI address 1a:00.1
, fibre channel protocol(fc
), with the remote WWPN of 0x5006016d3ee0025f
. The last number is a LUN id that the HBA has assigned to that LUN, but I've never found it useful.

- 16,824
- 14
- 67
- 103
If you don't have hdparm
and can't install it then you can try dmesg | grep -i ata
to obtain some information about your hard disks.

- 10,793
hdparm
does that too. – peterph May 14 '13 at 22:25