From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Mikael Abrahamsson <swmike@swm.pp.se>
Cc: Caspar Smit <c.smit@truebit.nl>,
"Desai, Kashyap" <Kashyap.Desai@lsi.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Moore, Eric" <Eric.Moore@lsi.com>,
"Prakash, Sathya" <Sathya.Prakash@lsi.com>
Subject: Re: mpt2sas: bug in disk ordering?
Date: Fri, 13 May 2011 09:39:04 -0500 [thread overview]
Message-ID: <1305297544.2611.22.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.DEB.2.00.1105131406320.20305@uplift.swm.pp.se>
On Fri, 2011-05-13 at 14:09 +0200, Mikael Abrahamsson wrote:
> On Fri, 13 May 2011, Caspar Smit wrote:
>
> > I am used to the fact that all disks in a chassis are ordered in linux
> > according to the slot numbers on the chassis, this is to ensure a
> > reliable RAID setup so that /dev/sdb for instance is always in a certain
> > slot in the chassis. So far I only used lsi 3081e-r controllers and
> > these always gave me solid and reliable disk numbering. If this goes
> > random, how am i supposed to keep track which disk is where in the
> > chassis?
>
> This has been discussed extensively before. There is no way to do it the
> way you want to.
Actually, there is, we just don't do it as a by-X rule in udev (although
nothing prevents you from adding a custom rule). If you want to
identify disks by SAS slot, you're basically asking what phy they're
connected to (and if you have expanders and phys, the unique identifier
is expander:[expander ...]:phy.
when udev gets the path to a SAS disk, it looks something like this:
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host1/port-1:0/expander-1:0/port-1:0:9/end_device-1:0:9/target1:0:1/1:0:1:0/scsi_device/1:0:1:0
So from this you can see I'm on expander 1:0 and port 1:0:9. The port
number is still dynamic, but from the port you can get to the phys:
ls /sys/class/sas_port/port-1\:0\:9/device/
end_device-1:0:9 phy-1:0:9 power sas_port uevent
That tells me port 1:0:9 is indeed phy 1:0:9
so 9 is the phy number. Expanders are also dynamically numbered, so if
you're behind an expander, you'll have to use something like the
expander serial number as the first part followed by the phy number. Or
just use enclosure services; most expanders have them.
James
prev parent reply other threads:[~2011-05-13 14:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 9:19 mpt2sas: bug in disk ordering? Caspar Smit
2011-05-13 10:34 ` Caspar Smit
2011-05-13 10:37 ` Arne Jansen
2011-05-13 10:41 ` Caspar Smit
2011-05-13 10:51 ` Arne Jansen
2011-05-13 10:56 ` Caspar Smit
2011-05-13 11:15 ` Desai, Kashyap
2011-05-13 11:46 ` Caspar Smit
2011-05-13 12:03 ` Billy Crook
2011-05-13 12:05 ` Caspar Smit
2011-05-13 12:09 ` Mikael Abrahamsson
2011-05-13 14:39 ` James Bottomley [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=1305297544.2611.22.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=Eric.Moore@lsi.com \
--cc=Kashyap.Desai@lsi.com \
--cc=Sathya.Prakash@lsi.com \
--cc=c.smit@truebit.nl \
--cc=linux-scsi@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).