[OpenIndiana-discuss] Best way to map SAS drives to physical positions

James C. McPherson james.c.mcpherson at gmail.com
Fri Oct 7 12:16:49 UTC 2011


Comments inline below

On  7/10/11 09:10 PM, Jeppe Toustrup wrote:
...
> Weird, that command lists the drives in a random order for me, and is
> thus unusable for me to use for mapping WWNs to JBOD slots.

Only if you operate on the assumption that the scsi-device node
is a parallel scsi target id directly associated with a physical
position in the jbod


> Here is an example of the information I get from the command for one
> of the drives (also available here: https://gist.github.com/1270080):
>
> hc://:product-id=X8DTU-LN4+:server-id=head01:chassis-id=1234567890/motherboard=0/hostbridge=2/pciexrc=2/pciexbus=3/pciexdev=0/pciexfn=0/iport=0/scsi-device=7
>    group: protocol                       version: 1   stability: Private/Private
>      resource          fmri
> hc://:product-id=X8DTU-LN4+:server-id=head01:chassis-id=1234567890/motherboard=0/hostbridge=2/pciexrc=2/pciexbus=3/pciexdev=0/pciexfn=0/iport=0/scsi-device=7
>    group: authority                      version: 1   stability: Private/Private
>      product-id        string    X8DTU-LN4+
>      chassis-id        string    1234567890
>      server-id         string    head01
>    group: storage                        version: 1   stability: Private/Private
>      target-port       string    w5000cca369c5cf1a
>      attached-port     string    w50080e520155d03f
>      lun64             int64     0
>      devid             string    id1,sd at n5000cca369c5cf1a
>      manufacturer      string    ATA
>      model             string    Hitachi HDS72302
>      firmware-revision string    A180
>      inquiry-device-type int32     0
>
>
> It states in the FMRI string that the this is scsi-device 7, however,
> the drive in question is really drive number 10 in the JBOD.
> scsi-device 6 is really slot 2 and so on - random numbering it seems.

You are making an invalid assumption. scsi-device=7 is attached
to an iport, which is a virtual - not physical - device. The
phy-num mask which you'll find from the prtconf -v output allows
you to figure out which PHY the device is physically connected to.

  
> The sas2ircu command does however work fine for me, and gives me the
> output I need. This is for instance for the same drive as above
> (https://gist.github.com/1270081):
>
> Device is a Hard disk
>    Enclosure #                             : 3
>    Slot #                                  : 10
>    SAS Address                             : 50080e5-2-0155-d00a
>    State                                   : Ready (RDY)
>    Size (in MB)/(in sectors)               : 1907729/3907029167
>    Manufacturer                            : ATA
>    Model Number                            : Hitachi HDS72302
>    Firmware Revision                       : A180
>    Serial No                               : MN1220F30DT4LD
>    GUID                                    : 5000cca369c5cf1a
>    Protocol                                : SATA
>    Drive Type                              : SATA_HDD


The sas2ircu (SAS2 Initiator/RAID Configuration Utility) from LSI
does more interrogation of your hba than you're seeing with fmtopo.
What fmtopo relies upon is a module to interpret the SES data
that is obtainable from your SES device. If you don't have that,
you either have to write one, or go and watch blinking lights.


James C. McPherson
--
Solaris kernel software engineer, system admin and troubleshooter
               http://www.jmcp.homeunix.com/blog
Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson




More information about the OpenIndiana-discuss mailing list