Harri Olin wrote: / > Alan Cox wrote: > / >> /Harri Olin wrote: >>> ata13: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>> ata13.00: ATA-7: WDC WD7500AYYS-01RCA0, 30.04G30, max UDMA/133 >>> ata13.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32) >>> ata13.00: configured for UDMA/133 >>> scsi 12:0:0:0: Direct-Access ATA WDC WD7500AYYS-0 30.0 PQ: 0 >>> ANSI: 5 >>> sd 12:0:0:0: [sdm] 1465149168 512-byte logical blocks: (750 GB/698 GiB) >>> sd 12:0:0:0: Attached scsi generic sg12 type 0 >>> sd 12:0:0:0: [sdm] Write Protect is off >>> sd 12:0:0:0: [sdm] Mode Sense: 00 3a 00 00 >>> sd 12:0:0:0: [sdm] Write cache: enabled, read cache: enabled, doesn't >>> support DPO or FUA >>> sdm: sdm1 >>> sd 12:0:0:0: [sdm] Attached SCSI disk/ >> So /dev/sdm > / > Sorry, I mistyped. Error was on ata23, not on ata13, as seen at the end > of dmesg. And I'm more interested on some kind of reliable way to make > the translation - is there anything on /sys where ata device number > could be checked? > I suppose ata23 could still be sd22/ I'm struggling with this same issue, and unfortunately, dmesg output (attached) isn't ordered nicely. I'm interested in knowing which ATA# a given device lines up with. For example, /dev/sdd. By hotplugging the device, I know it to be ata7. From dmesg I know it's scsi address is 3:0:0:0: and udevadm tells me it is host 3. Without hotplugging the drive, the only way I can map ataX to a given device is by matching the manufacturer and model number. This works in my setup, but I really need a solution that would allow me to have multiple of the same drive model attached, as Harri has. Harri's dmesg, at least with ata13, nicely shows consistency from one line to the next. Mine does not, as in: [ 2.021205] ata5.00: ATA-8: Hitachi HTS542516K9SA00, BBCOC31P, max UDMA/133 [ 2.021210] ata5.00: 312581808 sectors, multi 8: LBA48 NCQ (depth 31/32), AA [ 2.022565] ata5.00: configured for UDMA/133 [ 2.024065] ata9: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 2.024156] ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 2.024226] ata6: SATA link down (SStatus 0 SControl 300) [ 2.032423] ata7.00: ATA-8: FUJITSU MHZ2160BH G2, 00000009, max UDMA/100 [ 2.032427] ata7.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 2.032655] ata9.00: ATA-7: ST9160823AS, 3.AAB, max UDMA/133 [ 2.032659] ata9.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 2.040367] ata7.00: configured for UDMA/100 [ 2.048395] ata9.00: configured for UDMA/100 ...snip.... [ 57.081774] ata4.00: ATA-8: SAMSUNG HM251JJ, 2AA00_00, max UDMA7 [ 57.081780] ata4.00: 488397168 sectors, multi 8: LBA48 NCQ (depth 31/32), AA [ 57.087649] ata4.00: configured for UDMA/133 [ 57.100168] scsi 4:0:0:0: Direct-Access ATA SAMSUNG HM251JJ 2AA0 PQ: 0 ANSI: 5 [ 57.100456] sd 4:0:0:0: Attached scsi generic sg2 type 0 [ 57.100727] scsi 5:0:0:0: Direct-Access ATA Hitachi HTS54251 BBCO PQ: 0 ANSI: 5 [ 57.100983] sd 5:0:0:0: Attached scsi generic sg3 type 0 [ 57.101723] scsi 3:0:0:0: Direct-Access ATA FUJITSU MHZ2160B 0000 PQ: 0 ANSI: 5 [ 57.101914] sd 3:0:0:0: Attached scsi generic sg4 type 0 [ 57.102435] sd 3:0:0:0: [sdd] 312581808 512-byte logical blocks: (160 GB/149 GiB) [ 57.102517] sd 3:0:0:0: [sdd] Write Protect is off [ 57.102521] sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00 [ 57.102598] sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Host4 (scsi 4:0:0:0:) is, indeed, ata4. I've verified this by hotplugging. Host3 (scsi 3:0:0:0:) however has shown up long after any ata7 messages. How am I to correlate them? Everything I've seen in /sys/ seems related to the host# or the scsi address. The only place I see ata#s are in dmesg, and the only error message I've seen that contains both ata# and scsi address is a detach message ([ 3358.584098] ata7.00: detaching (SCSI 3:0:0:0)" How useful is knowing "ata7: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozen" if I don't know what ata7 is? And the reliable method I've thusly found (connect and disconnect sata cables on drives while monitoring dmesg) doesn't seem like the safest way of doing things. -- Paul Klapperich