Re: mpt2sas: bug in disk ordering?

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

 



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


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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux