The "ata" number seems to be the "scsi" number plus one; but is that always so? and could the utility output the actual value of it for the drive, if not? Example:
[Sun Jul 5 01:55:08 2015] ata5: hard resetting link
[Sun Jul 5 01:55:10 2015] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[Sun Jul 5 01:55:10 2015] ata5.00: ATA-8: WDC WD20EADS-00S2B0, 01.00A01, max UDMA/133
[Sun Jul 5 01:55:10 2015] ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[Sun Jul 5 01:55:10 2015] ata5.00: configured for UDMA/133
[Sun Jul 5 01:55:10 2015] ata5: EH complete
[Sun Jul 5 01:55:10 2015] ata5.00: detaching (SCSI 4:0:0:0)
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sdf] Stopping disk
[Sun Jul 5 01:55:10 2015] scsi 4:0:0:0: Direct-Access ATA WDC WD20EADS-00S 0A01 PQ: 0 ANSI: 5
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Write Protect is off
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: Attached scsi generic sg4 type 0
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[Sun Jul 5 01:55:11 2015] sde: unknown partition table
[Sun Jul 5 01:55:11 2015] sd 4:0:0:0: [sde] Attached SCSI disk
The SCSI number lsdrv prints currently is largely useless, because e.g. ATA errors only report the ATA number and not the SCSI one. Another example:
[ 89.266638] ata9.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 89.266764] ata9.00: failed command: FLUSH CACHE EXT
[ 89.266857] ata9.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 8
[ 89.266857] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 89.267024] ata9.00: status: { DRDY }
[ 89.267110] ata9: hard resetting link
[ 89.758351] ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 370)
[ 89.818514] ata9.00: configured for UDMA/133
[ 89.818522] ata9.00: retrying FLUSH 0xea Emask 0x4
[ 89.818590] ata9.00: device reported invalid CHS sector 0
[ 89.818603] ata9: EH complete
The "ata" number seems to be the "scsi" number plus one; but is that always so? and could the utility output the actual value of it for the drive, if not? Example:
[Sun Jul 5 01:55:08 2015] ata5: hard resetting link
[Sun Jul 5 01:55:10 2015] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[Sun Jul 5 01:55:10 2015] ata5.00: ATA-8: WDC WD20EADS-00S2B0, 01.00A01, max UDMA/133
[Sun Jul 5 01:55:10 2015] ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[Sun Jul 5 01:55:10 2015] ata5.00: configured for UDMA/133
[Sun Jul 5 01:55:10 2015] ata5: EH complete
[Sun Jul 5 01:55:10 2015] ata5.00: detaching (SCSI 4:0:0:0)
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sdf] Stopping disk
[Sun Jul 5 01:55:10 2015] scsi 4:0:0:0: Direct-Access ATA WDC WD20EADS-00S 0A01 PQ: 0 ANSI: 5
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Write Protect is off
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: Attached scsi generic sg4 type 0
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[Sun Jul 5 01:55:10 2015] sd 4:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[Sun Jul 5 01:55:11 2015] sde: unknown partition table
[Sun Jul 5 01:55:11 2015] sd 4:0:0:0: [sde] Attached SCSI disk
The SCSI number lsdrv prints currently is largely useless, because e.g. ATA errors only report the ATA number and not the SCSI one. Another example:
[ 89.266638] ata9.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 89.266764] ata9.00: failed command: FLUSH CACHE EXT
[ 89.266857] ata9.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 8
[ 89.266857] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 89.267024] ata9.00: status: { DRDY }
[ 89.267110] ata9: hard resetting link
[ 89.758351] ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 370)
[ 89.818514] ata9.00: configured for UDMA/133
[ 89.818522] ata9.00: retrying FLUSH 0xea Emask 0x4
[ 89.818590] ata9.00: device reported invalid CHS sector 0
[ 89.818603] ata9: EH complete