Re: mapping ataXX.YY to a /dev/sdX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jérôme Poulin wrote:
> On Sat, Jul 10, 2010 at 7:49 PM, Rudy Zijlstra
> <rudy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > Jeff Garzik wrote:
> >>
> >> On 07/10/2010 03:05 AM, Rudy Zijlstra wrote:
> >>>
> >>> Judging from my dmesg and lsscsi on a system with both scsi and SATA,
> >>> ataX translates into scsi X:0:0:0
> >>
> >>
> >> There is no translation.
> >>
> >> It is random, based on driver load order.
> >
> > This then begs the question whether it can be dependingly derived from dmesg
> > messages. Like messages
> >
> > [    2.268315] ata7.00: configured for UDMA/133
> > [    2.277452] scsi 7:0:0:0: Direct-Access     ATA      WDC WD7500AAKS-0
> > 30.0 PQ: 0 ANSI: 5
> >
> > always following each other, thus making identification possible.
>
> I find it rather confusing in my log, and there are situation when you
> hotplug the disk which does not make it show up right after the ataX
> line, also if the logs overflow, then you can't know anyway. (I know
> there's syslog too)
> 
> There doesn't seem to be any mapping in /sys I though lshw would show
> it but it isn't.

For a scsi_host driven by libata, the number in /sys/class/scsi_host/host?/unique_id
should match the ataX value.  You can check /sys/class/scsi_host/host?/proc_name
to see the driver for a particular scsi_host.

-jim
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux