Find a drive on a SAS backplane

Find a drive on a SAS backplane

I am creating this resource for myself and others that have systems with SAS backplanes that their drives are attached to. @danb35 has created a script for monitoring drives that fault and automatically turning on the locate LED, but some people, like me, might not want a script running and just want a resource to remind them how to turn the locate LED on when a drive needs to be identified.

The sas2ircu is the SAS2 IR (Integrated Raid) CU (Configuration Utility). These commands still work on the hardware even when it is in IT (Initiator Target) mode.

The command to illuminate the locate LED is sas2ircu 0 locate 3:6 ON and that should also work with sas3ircu but I have not tested that yet. If I get a chance to do it, I will and post an update.
The command to turn the locate LED off is sas2ircu 0 locate 3:6 OFF
This will only work for compatible hardware, so if it doesn't work for you, I offer no refunds.

The response from some of these commands can be lengthy and you will need to be able to inspect the output to find the data you need, so you will want to be using something with a long scroll-back buffer. I use Cygwin64 Terminal, I might make a resource on how to set that up, because I find it more like a Linux / BSD terminal window than PuTTY, which can totally work for this. The thing you can't use is the "Shell" that is integrated in the FreeNAS GUI because it is way to cumbersome and the ability to scroll back to something that went off the screen is limited.

Now the hard part. In the sas2ircu command, the first number, in my case a zero, indicates the SAS controller. If you have more than one SAS controller, this could be a one or even two. To find out what you have, you can use sas2ircu list to get the following output, or something similar:
From my NAS:
Code:
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.


         Adapter      Vendor  Device                       SubSys  SubSys
Index    Type          ID      ID    Pci Address          Ven ID  Dev ID
-----  ------------  ------  ------  -----------------    ------  ------
   0     SAS2308_2     1000h    87h   00h:03h:00h:00h      1000h   3020h
SAS2IRCU: Utility Completed Successfully.

An example from some other system so you can see what it would look like if there were more cards:
Code:
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.


Adapter  Vendor        Device  SubSys  SubSys
Index    Type          ID      ID      Pci Address        Ven ID  Dev ID
-----    ------------  ------  ------  -----------------  ------  ------
  0       SAS2008       1000h   72h     00h:09h:00h:00h    1000h   3020h

Adapter  Vendor        Device  SubSys  SubSys
Index    Type          ID      ID      Pci Address        Ven ID  Dev ID
-----    ------------  ------  ------  -----------------  ------  ------
  1       SAS2008       1000h   72h     00h:06h:00h:00h    1000h   3020h

Adapter  Vendor        Device  SubSys  SubSys
Index    Type          ID      ID      Pci Address        Ven ID  Dev ID
-----    ------------  ------  ------  -----------------  ------  ------
  2       SAS2008       1000h   72h     00h:05h:00h:00h    1000h   3020h

SAS2IRCU: Utility Completed Successfully.

In the "Index" column of this table, if you have more than one card, the number in that column indicates which controller is which.

That means you need to know which controller the drive is attached to.

You can find that with this command: camcontrol devlist
That will give you a list similar to this:
Code:
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 20 lun 0 (pass4,da4)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 21 lun 0 (pass5,da5)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 22 lun 0 (pass6,da6)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 23 lun 0 (pass7,da7)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 24 lun 0 (pass8,da8)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 25 lun 0 (pass9,da9)
<1401-00 80H10024001A0 1401>       at scbus0 target 26 lun 0 (ses0,pass10)
<1401-00 80H10024001A0 1401>       at scbus0 target 45 lun 0 (ses1,pass11)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 47 lun 0 (pass12,da10)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 48 lun 0 (pass13,da11)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 49 lun 0 (pass14,da12)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 50 lun 0 (pass15,da13)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 51 lun 0 (pass16,da14)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 52 lun 0 (pass17,da15)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 53 lun 0 (pass18,da16)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 54 lun 0 (pass19,da17)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 55 lun 0 (pass20,da18)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 56 lun 0 (pass21,da19)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 57 lun 0 (pass22,da20)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 58 lun 0 (pass23,da21)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 59 lun 0 (pass24,da22)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 60 lun 0 (pass25,da23)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 61 lun 0 (pass26,da24)
<ATA ST4000DM000-1F21 CC52>        at scbus0 target 62 lun 0 (pass27,da25)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 66 lun 0 (pass28,da26)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 67 lun 0 (pass29,da27)
<ATA ST4000DM000-1F21 CC54>        at scbus0 target 68 lun 0 (pass30,da28)
<ATA ST4000NM0033-9ZM SN06>        at scbus0 target 69 lun 0 (pass31,da29)
<ATA ST4000NM0033-9ZM SN06>        at scbus0 target 70 lun 0 (pass32,da30)
<ATA ST4000NM0033-9ZM SN06>        at scbus0 target 71 lun 0 (pass33,da31)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 72 lun 0 (da0,pass0)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 73 lun 0 (da1,pass1)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 74 lun 0 (da2,pass2)
<ATA WDC WD6002FRYZ-0 1M02>        at scbus0 target 75 lun 0 (da3,pass3)
<FUJITSU MHW2040BS 00000012>       at scbus4 target 0 lun 0 (ada0,pass34)
<FUJITSU MHW2040BS 00000012>       at scbus5 target 0 lun 0 (pass35,ada1)

The part of that output that relates to the card the drive is attached to is the scbus0 and that zero after scbus should represent the card that the drive is attached to. It is potentially a little confusing if you also have drives attached to SATA because SATA drives are enumerated here also, see scbus4 and scbus5 in my list? Those are SATA drives attached to SATA ports where all the others are SATA drives attached to two different SAS expander backplanes that are all attached to the same SAS controller.

Now, if you only have one controller, you don't need that, and you could just do this to display all the devices attached to the controller that you have: sas2ircu 0 display

The zero in the middle of that command indicates the controller you are checking, so if you did have multiple controllers, you would need to use the correct number there.

The output of this is quite long on my system, so I will only share part of it:
Code:
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.

Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
  Controller type                         : SAS2308_2
  BIOS version                            : 0.00.00.00
  Firmware version                        : 20.00.07.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 1023
  Concurrent commands supported           : 10240
  Slot                                    : Unknown
  Segment                                 : 0
  Bus                                     : 3
  Device                                  : 0
  Function                                : 0
  RAID Support                            : No
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Enclosure services device
  Enclosure #                             : 2
  Slot #                                  : 0
  SAS Address                             : 5001c45-0-0095-d8bd
  State                                   : Standby (SBY)
  Manufacturer                            : 1401-00
  Model Number                            : 80H10024001A0
  Firmware Revision                       : 1401
  Serial No                               : x360xxxx
  GUID                                    : N/A
  Protocol                                : SAS
  Device Type                             : Enclosure services device


... SNIP ...

Device is a Hard disk
  Enclosure #                             : 2
  Slot #                                  : 6
  SAS Address                             : 5001c45-0-0095-d882
  State                                   : Ready (RDY)
  Size (in MB)/(in sectors)               : 5723166/11721045167
  Manufacturer                            : ATA
  Model Number                            : WDC WD6002FRYZ-0
  Firmware Revision                       : 1M02
  Serial No                               : xxxxHRRD
  GUID                                    : N/A
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

... SNIP ...

Device is a Enclosure services device
  Enclosure #                             : 3
  Slot #                                  : 0
  SAS Address                             : 5001c45-0-0095-debd
  State                                   : Standby (SBY)
  Manufacturer                            : 1401-00
  Model Number                            : 80H10024001A0
  Firmware Revision                       : 1401
  Serial No                               : x360xxxx
  GUID                                    : N/A
  Protocol                                : SAS
  Device Type                             : Enclosure services device

... SNIP ...

Device is a Hard disk
  Enclosure #                             : 3
  Slot #                                  : 6
  SAS Address                             : 5001c45-0-0095-de82
  State                                   : Ready (RDY)
  Size (in MB)/(in sectors)               : 5723166/11721045167
  Manufacturer                            : ATA
  Model Number                            : WDC WD6002FRYZ-0
  Firmware Revision                       : 1M02
  Serial No                               : xxxx8UYD
  GUID                                    : N/A
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

... SNIP ...

Device is a Hard disk
  Enclosure #                             : 3
  Slot #                                  : 5
  SAS Address                             : 5001c45-0-0095-de85
  State                                   : Ready (RDY)
  Size (in MB)/(in sectors)               : 5723166/11721045167
  Manufacturer                            : ATA
  Model Number                            : WDC WD6002FRYZ-0
  Firmware Revision                       : 1M02
  Serial No                               : xxxxHM3D
  GUID                                    : N/A
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

... SNIP ...

------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500605b0:09ef7220
  Numslots                                : 8
  StartSlot                               : 0
  Enclosure#                              : 2
  Logical ID                              : 5001c450:0095d8bf
  Numslots                                : 38
  StartSlot                               : 0
  Enclosure#                              : 3
  Logical ID                              : 5001c450:0095debf
  Numslots                                : 38
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.


On my system, the full output is 522 lines long, so I usually direct it to a file and use a search tool on the file to find the hard drive I am looking for by serial number. However, if you look at it, this gives you the numbers you need, to know for that 3:6 is in the command: sas2ircu 0 locate 3:6 ON
The first number, before the colon is the "Enclosure" and the second is the "Slot". If you look at the output above, you see that there is an Enclosure 1, 2 and 3. I have a system at work that has five, so it can make a big difference. If you notice, the drive model in Enclosure 2, Slot 6 is the same as in Enclosure 3, Slot 6, so checking the serial number is important to verify the correct drive is being illuminated. I usually find the Enclosure and Slot by searching for the Serial number.

This should give all the required elements for the command. On my system, this works to make a red LED flash on the drive tray. It will continue to flash until you go back with the OFF version.

I referenced information from many sources to put this together in one place in an effort to make the answer easy to find. I hope it is helpful to some. It works for me on disk shelves that are SAS attached to a FreeNAS at work and those shelves are made by QNAP. It also works on my Chenbro SAS expander backplanes in my home system. It is a fairly standard command for hardware using LSI SAS chipsets and should be widely useful but not universal.

No guarantee. YMMV
Author
Chris Moore
Views
5,957
First release
Last update
Rating
0.00 star(s) 0 ratings
Top