dmesg reports to be the following
[78909.100057] ata5.00: failed command: WRITE DMA
[78909.100063] ata5.00: cmd ca/00:08:80:08:00/00:00:00:00:00/e0 tag 11 dma 4096 out
res 51/04:00:88:08:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[78909.100067] ata5.00: status: { DRDY ERR }
[78909.100069] ata5.00: error: { ABRT }
lsscsi reports
....
[4:0:0:0] disk ATA Maxtor 6H500F0 1DD0 /dev/sdc
[5:0:0:0] disk ATA Maxtor 6H500F0 1DD0 /dev/sdd
[6:0:0:0] disk ATA Maxtor 6H500F0 1DD0 /dev/sde
....
and ls /dev/disk/by-path/ reports
....
lrwxrwxrwx 1 root root 9 Oct 7 18:22 pci-0000:00:1f.2-ata-4 -> ../../sdd
lrwxrwxrwx 1 root root 10 Oct 7 18:22 pci-0000:00:1f.2-ata-4-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 Oct 7 18:22 pci-0000:00:1f.2-ata-5 -> ../../sde
lrwxrwxrwx 1 root root 10 Oct 7 18:22 pci-0000:00:1f.2-ata-5-part1 -> ../../sde1
lrwxrwxrwx 1 root root 9 Oct 7 18:22 pci-0000:00:1f.2-ata-6 -> ../../sdf
lrwxrwxrwx 1 root root 10 Oct 7 18:22 pci-0000:00:1f.2-ata-6-part1 -> ../../sdf1
....
The failed disk is either /dev/sdd or /dev/sde, but since both disks here is the same make and model it is hard for me to determine which serial number under /dev/disk/by-id is the correct one to remove.
Now the question is: dmesg refers to ata5.00 , which one is correct? lsscsi or /dev/disk-by/path/ or (more likely) are both correct. How to determine which disk is actually failing?
EDIT: This question is about finding out what ataX.XX in dmesg refers to what /dev/sdX