[CentOS] How to map ata#.# numbers to /dev/sd numbers?

Thu Jan 28 15:01:17 UTC 2010
Toby Bluhm <tkb at alltechmedusa.com>

Stephen Harris wrote:
> On my C5 machine (a Dell XPS420) I have a 500Gb disk on the internal SATA
> controller.
> 
> I also have a SiI3132 dual-port multi-device eSATA card.  This is connected
> to an external SATA array of disks.
> 
> Now occasionally I see something like this in my logs
> 
> ata7.01: exception Emask 0x0 SAct 0x0 SErr 0x0 a ction 0x0
> ata7.01: irq_stat 0x00060002, device error via D 2H FIS
> ata7.01: cmd 25/00:08:47:1c:92/00:00:6c:00:00/e0 tag 0 dma 4096 in
>          res 51/40:00:4e:1c:92/00:00:6c:00:00/00 Emask 0x9 (media error)
> ata7.01: status: { DRDY ERR }
> ata7.01: error: { UNC }
> ata7.01: configured for UDMA/100
> ata7: EH complete
> 
> How do I tell what disk this is complaining about?  Is there a way
> to determine what ata7.01 maps to in terms of /dev/sd# values?
> 
> /proc/scsi/scsi doesn't obviously match scsi# numbers to ata# numbers :-(
> 

Try looking in /dev/disk/

-- 
tkb