Skip to content

Instantly share code, notes, and snippets.

@tracernz
Created October 25, 2019 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracernz/62d2eb9631ecd934e7fd36755803d750 to your computer and use it in GitHub Desktop.
Save tracernz/62d2eb9631ecd934e7fd36755803d750 to your computer and use it in GitHub Desktop.

How to identify disk by LEDs with LSI HBA

List adaptors

$ sudo sas2ircu LIST
LSI Corporation SAS2 IR Configuration Utility.
Version 16.00.00.00 (2013.03.01)
Copyright (c) 2009-2013 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:03h:00h:00h      1028h   1f51h

         Adapter      Vendor  Device                       SubSys  SubSys
 Index    Type          ID      ID    Pci Address          Ven ID  Dev ID
 -----  ------------  ------  ------  -----------------    ------  ------
   1     SAS2008     1000h    72h   00h:04h:00h:00h      1028h   1f1ch

         Adapter      Vendor  Device                       SubSys  SubSys
 Index    Type          ID      ID    Pci Address          Ven ID  Dev ID
 -----  ------------  ------  ------  -----------------    ------  ------
   2     SAS2008     1000h    72h   00h:46h:00h:00h      1000h   30e0h

         Adapter      Vendor  Device                       SubSys  SubSys
 Index    Type          ID      ID    Pci Address          Ven ID  Dev ID
 -----  ------------  ------  ------  -----------------    ------  ------
   3     SAS2008     1000h    72h   00h:47h:00h:00h      1000h   30e0h
SAS2IRCU: Utility Completed Successfully.

So we have adaptors 0-3.

Find disk by serial

In this case it was on adaptor 2. Could loop through each adaptor.

$ sudo sas2ircu 2 DISPLAY | grep -B 9 -A 3 Z1F*****
Device is a Hard disk
  Enclosure #                             : 2
  Slot #                                  : 6
  SAS Address                             : 5003048-0-00c7-8c12
  State                                   : Ready (RDY)
  Size (in MB)/(in sectors)               : 2861588/5860533167
  Manufacturer                            : ATA
  Model Number                            : ST3000DM001-1CH1
  Firmware Revision                       : CC29
  Serial No                               : Z1F*****
  GUID                                    : 5000c500665ba90a
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

So the disk is in enclosure 2, slot 6.

Let's flash the LEDs

Adaptor = 2, Enclosure:Slot = 2:6

sudo sas2ircu 2 LOCATE 2:6 ON

Now physically locate the disk, the red LED to solid on. Don't pull it out yet as we can't turn the LED off without a disk in the bay.

sudo sas2ircu 2 LOCATE 2:6 OFF

Now pull the disk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment