I have an Ubuntu installation which has a lot of hard drives. Two of these drives have hiccups and SMART is reporting errors. However, I cannot figure out how to determine which drive is ata1.00 and which is ata12.00. Is it possible to retrieve their serial numbers, as this would be easiest way to find the correct drives?
ls -l /sys/class/ata_port/ should show the link to PCI id. Then
ls -l /dev/disk/by-path/ would tell you what /dev/* that that is assigned to.
lshw -C disk
will get you drives, their product ids, and mount points.
description: ATA Disk product: XXXX vendor: Seagate physical id: 0 bus info: scsi@0:0.0.0 logical name: /dev/sda version: JC4B serial: XXXYYY size: 931GiB (1TB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 signature=0006ded4
You can then find their most recent mount info in /var/log/syslog, with something like (e.g. looking for disk /dev/sda)
cat /var/log/syslog | grep 'sda' -A 5 -B 5
for other info, you can also try
If you don't know the device name but know the bus number of an IDE harddrive, and want to find out the serial number, you can do:
Where "0.0" is the bus number.
ls -l /dev/disk/by-path and find the
sd* device that corresponds. Then look at
ls -l /dev/disk/by-id for the model and serial number that corresponds to that
You may find this helpful:
sudo lshw -class disk -short
(or try it without the
-short but pipe it into
hdparm -i /dev/whatever.