Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Jim Paris <jim@jtan.com>
To: "Jérôme Poulin" <jeromepoulin@gmail.com>
Cc: Rudy Zijlstra <rudy@grumpydevil.homelinux.org>,
	Jeff Garzik <jeff@garzik.org>, Brad Campbell <brad@wasp.net.au>,
	Mikael Abrahamsson <swmike@swm.pp.se>,
	Janek Kozicki <janek_listy@wp.pl>,
	linux-raid@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: mapping ataXX.YY to a /dev/sdX
Date: Wed, 14 Jul 2010 15:05:41 -0400	[thread overview]
Message-ID: <20100714190541.GA27855@psychosis.jim.sh> (raw)
In-Reply-To: <AANLkTiluwfd9LTH7Tb0J9N3NBvp1FbZdoJYUYj1g8BJz@mail.gmail.com>

Jérôme Poulin wrote:
> On Sat, Jul 10, 2010 at 7:49 PM, Rudy Zijlstra
> <rudy@grumpydevil.homelinux.org> 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-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2010-07-14 19:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.1.10.1007070810540.23489@uplift.swm.pp.se>
     [not found] ` <87wrt7ijp3.fsf@rimspace.net>
     [not found]   ` <alpine.DEB.1.10.1007071749320.23489@uplift.swm.pp.se>
2010-07-08 10:05     ` mapping ataXX.YY to a /dev/sdX Tim Small
2010-07-08 10:26       ` Mikael Abrahamsson
     [not found]         ` <20100708104422.GA32564@cthulhu.home.robinhill.me.uk>
2010-07-08 11:05           ` Mikael Abrahamsson
     [not found]             ` <20100708232631.014a5ade@atak.bl.pg.gda.pl>
2010-07-08 21:53               ` Mikael Abrahamsson
2010-07-10  4:42                 ` Brad Campbell
2010-07-10  7:05                   ` Rudy Zijlstra
2010-07-10 11:45                     ` Anssi Hannula
2010-07-10 19:23                     ` Jeff Garzik
2010-07-10 23:49                       ` Rudy Zijlstra
2010-07-11 19:01                         ` Jérôme Poulin
     [not found]                         ` <AANLkTiluwfd9LTH7Tb0J9N3NBvp1FbZdoJYUYj1g8BJz@mail.gmail.com>
2010-07-14 19:05                           ` Jim Paris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100714190541.GA27855@psychosis.jim.sh \
    --to=jim@jtan.com \
    --cc=brad@wasp.net.au \
    --cc=janek_listy@wp.pl \
    --cc=jeff@garzik.org \
    --cc=jeromepoulin@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=rudy@grumpydevil.homelinux.org \
    --cc=swmike@swm.pp.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox