How to identify and blink an enclosure drive

How to identify a single drive in a server SAS enclosure

How to identify and blink an enclosure drive
Photo by panumas nikhomkhai

1. Find the enclosure ID

sas2ircu list

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:02h:00h:00h      1028h   1f38h 

         Adapter      Vendor  Device                       SubSys  SubSys 
 Index    Type          ID      ID    Pci Address          Ven ID  Dev ID 
 -----  ------------  ------  ------  -----------------    ------  ------ 
   1     SAS2308_2     1000h    87h   00h:43h:00h:00h      1000h   3040h 
SAS2IRCU: Utility Completed Successfully.

2. Display drives of the enclosure and find the drive by serial number

sas2ircu 0 display|less

...
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #                             : 2
  Slot #                                  : 0
  SAS Address                             : 5000c50-0-71ba-bf59
  State                                   : Ready (RDY)
  Size (in MB)/(in sectors)               : 572325/1172123567
  Manufacturer                            : NETAPP  
  Model Number                            : X422_SLTNG600A10
  Firmware Revision                       : NA02
  Serial No                               : S0M1ZCWK
  GUID                                    : 5000c50071babf5b
  Protocol                                : SAS
  Drive Type                              : SAS_HDD
...

3. Find drive path from serial number

lsblk -n -o PATH,SERIAL | grep 'A0IVFUZ5'

/dev/sdq          25R0A0IVFUZ5

4. Create fake activity to identify drive

dd if=/dev/sdq of=/dev/null