Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I relate this information with which physical drive is failing? It's a debian kernel.

Nov 21 18:06:00 IHPAC kernel: [594026.608042] ata5.00: status: { DRDY }
Nov 21 18:06:00 IHPAC kernel: [594026.787427] ata5.00: failed command: WRITE FPDMA QUEUED
Nov 21 18:06:00 IHPAC kernel: [594026.966505] ata5.00: cmd 61/00:e8:fb:b6:59/04:00:a2:00:00/40 tag 29 ncq 524288 out
Nov 21 18:06:00 IHPAC kernel: [594026.966508]          res 40/00:48:03:ef:59/00:00:a2:00:00/40 Emask 0x50 (ATA bus error)


IHPAC:~$ dmesg | grep ata5
[    6.291403] ata5: SATA max UDMA/133 abar m1024@0xfaffe400 port 0xfaffe600 irq 22
[    6.840145] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    6.840829] ata5.00: ATA-8: ST3000DM001-9YN166, CC9C, max UDMA/133
[    6.840832] ata5.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    6.841483] ata5.00: configured for UDMA/133
[59669.062886] ata5: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen
[59669.066958] ata5: irq_stat 0x00400000, PHY RDY changed
[59669.069852] ata5: SError: { RecovComm Persist PHYRdyChg 10B8B }
[59669.073247] ata5: hard resetting link
[59675.560102] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[59675.561576] ata5.00: configured for UDMA/133
[59675.561589] ata5: EH complete
...
[421238.151794] ata5: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen   \
[421238.155912] ata5: irq_stat 0x00400000, PHY RDY changed                            \
[421238.158854] ata5: SError: { RecovComm Persist PHYRdyChg 10B8B }                    |
[421238.162302] ata5: hard resetting link                                              | Repeats 5 times
[421244.650101] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)                 |
[421244.651513] ata5.00: configured for UDMA/133                                      /
[421244.651525] ata5: EH complete                                                    /
...
[593676.000793] ata5.00: exception Emask 0x50 SAct 0x7fffffff SErr 0x90a02 action 0xe frozen
[593676.130479] ata5.00: irq_stat 0x00400000, PHY RDY changed
[593676.259877] ata5: SError: { RecovComm Persist HostInt PHYRdyChg 10B8B }
[593676.388864] ata5.00: failed command: WRITE FPDMA QUEUED                             \
[593676.513825] ata5.00: cmd 61/e0:00:ab:ac:30/01:00:9d:00:00/40 tag 0 ncq 245760 out    | Repeats MANY times
[593676.750610] ata5.00: status: { DRDY }                                               /
...
[593697.436610] ata5: hard resetting link
[593698.380128] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[593698.382682] ata5.00: configured for UDMA/133
[593698.382883] ata5: EH complete
[594005.248408] ata5.00: exception Emask 0x50 SAct 0x7fffffff SErr 0x90a02 action 0xe frozen
[594005.429802] ata5.00: irq_stat 0x00400000, PHY RDY changed
[594005.610614] ata5: SError: { RecovComm Persist HostInt PHYRdyChg 10B8B }
[594005.791306] ata5.00: failed command: WRITE FPDMA QUEUED                            \
[594005.972202] ata5.00: cmd 61/00:00:fb:8a:59/04:00:a2:00:00/40 tag 0 ncq 524288 out   | Repeats MANY times
[594006.337349] ata5.00: status: { DRDY }                                              /
...
[594028.228309] ata5: hard resetting link
[594029.170095] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[594029.173073] ata5.00: configured for UDMA/133
[594029.173367] ata5: EH complete
share|improve this question
1  
Must be drive by shooting night. –  Mark0978 Nov 22 '13 at 1:25
    
What's dmesg | grep ata5 come up with ? –  Lawrence Nov 22 '13 at 3:14
    
Looks like the model # of the drive is in dmesg. How do I get to the /dev/sd? device, or to something that will physically identify which drive needs to be replaced, like a serial #? I have 6 drives of the same model in this machine. –  Mark0978 Nov 22 '13 at 3:55
    
Try looking at the output of lshw and fdisk -l to see if there is anything there that can linked together and back to the info you're seeing. –  Iain Nov 22 '13 at 17:36

2 Answers 2

up vote 6 down vote accepted

I searched the internet for you and found this script as the second answer

for x in /sys/block/sd*
do
dev=$(basename $x)
host=$(ls -l $x | egrep -o "host[0-9]+")
target=$(ls -l $x | egrep -o "target[0-9:]*")
a=$(cat /sys/class/scsi_host/$host/unique_id)
a2=$(echo $target | egrep -o "[0-9]:[0-9]$" | sed 's/://')
serial=$(hdparm -I /dev/$dev | grep "Serial Number" | sed 's/^[ \t]*//')
echo -e "$dev \t ata$a.$a2 \t $serial"
done
share|improve this answer
    
@Mark0978: Click the first link I provided. –  Iain Nov 22 '13 at 22:18
    
Thanks, that is what I was trying to find. I hate it when links aren't underlined are in a font that looks like normal text. Thank you. –  Mark0978 Nov 22 '13 at 22:20
    
@Mark0978: yeah meta.serverfault.com/questions/262/… you may like to try userstyles.org/styles/68486/serverfault –  Iain Nov 22 '13 at 22:22

Smartctl will shows you the serial numbers of the drives present. dmesg should also have the serial numbers of the other disks.

If you are only using a single sATA controller (not a sATA board plus on-board), then the ata* will map to the port generally.

The whole dmesg would be best, but I'd assume it is connector 5 on the board.

share|improve this answer
    
This is a rackmount case with a hot swap backplane. I've run smartctl test=short test on all the drives and ALL of them pass! I'll have to run the longer test over the weekend. –  Mark0978 Nov 22 '13 at 14:32
    
There are 3 sata controllers on this motherboard too.... –  Mark0978 Nov 22 '13 at 14:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.