# Which drive is ata5? [ solved ]

## russK

We had a power outage during the snowstorm here on the US east-coast, and when my box was rebooting, it was very sluggish and had trouble finding the RAID.  I have a six-disk RAID in this box.  I removed and re-added a couple drives and it resynched (under sysrescuecd) and now it's booting and running ok but there is still a hardware problem - I am getting things like this in the dmesg:

```
ata5.00: exception Emask 0x10 SAct 0x7 SErr 0x400000 action 0x6 frozen

ata5.00: irq_stat 0x08000000, interface fatal error

ata5: SError: { Handshk }

ata5.00: failed command: WRITE FPDMA QUEUED

ata5.00: cmd 61/00:00:bf:55:13/04:00:40:00:00/40 tag 0 ncq 524288 out

         res 40/00:14:bf:35:13/00:00:40:00:00/40 Emask 0x10 (ATA bus error)

ata5.00: status: { DRDY }

ata5.00: failed command: WRITE FPDMA QUEUED

ata5.00: cmd 61/80:08:bf:59:13/00:00:40:00:00/40 tag 1 ncq 65536 out

         res 40/00:14:bf:35:13/00:00:40:00:00/40 Emask 0x10 (ATA bus error)

ata5.00: status: { DRDY }

ata5.00: failed command: WRITE FPDMA QUEUED

ata5.00: cmd 61/80:10:bf:35:13/00:00:40:00:00/40 tag 2 ncq 65536 out

         res 40/00:14:bf:35:13/00:00:40:00:00/40 Emask 0x10 (ATA bus error)

ata5.00: status: { DRDY }

ata5: hard resetting link

ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata5.00: configured for UDMA/133

ata5: EH complete

```

So, if I replace the drive, how do I figure out which physical drive is ata5?

ThanksLast edited by russK on Sun Jan 30, 2011 1:43 am; edited 1 time in total

----------

## hielvc

Well I would run this 

```
sudo dmesg|awk '/ATA-|ATAPI/'

ata1.00: ATA-8: ST3750528AS, CC37, max UDMA/133

ata4.00: ATA-6: WDC WD2500JD-00HBB0, 08.02D08, max UDMA/133

ata5.00: ATAPI: ATAPI   iHAS324   Y, BL1Y, max UDMA/100

ata6.00: ATAPI: HL-DT-ST BD-RE  BH10LS30, 1.00, max UDMA/133

scsi 4:0:0:0: CD-ROM            ATAPI    iHAS324   Y      BL1Y PQ: 0 ANSI: 5
```

You should do this from your livecd. Then power down unplug 2 likely candidates reboot and run the script again until you unplug ata5.

----------

## Hu

There is no need for sudo here.

When the drive is first discovered during boot, the kernel should print several lines containing the drive capacity, access mode, and manufacturer/serial number.  You can see an example of this in the first two lines of hielvc's dmesg output.  If you can match up the printed serial number with markings on the drive, you may be able to avoid manual searches.

----------

## russK

It did not seem to print serial-number information in the dmesg.  Eventually the RAID kicked out /dev/sde as failed, so it makes sense that ata1=sda, ata2=sdb, ata3=sdc, ata4=sdd, ata5=sde ...

# 'smartctl -a /dev/sde' would show the serial number except by then the drive was not making sense ... I had to check all of the other drives serial numbers with smartctl -a and then remove the remaining drive.

Thanks!

----------

