Posts in category led

Disk location in OpenIndiana

List all the disk configured in the system

root@seal:~# ls /dev/rdsk/*d0s0
/dev/rdsk/c2t5000CCA369C47080d0s0  /dev/rdsk/c2t5000CCA37DC31681d0s0  /dev/rdsk/c2t5000CCA37DC5BBAAd0s0  /dev/rdsk/c2t5000CCA37DC61D8Bd0s0
/dev/rdsk/c2t5000CCA369C4E90Bd0s0  /dev/rdsk/c2t5000CCA37DC350B2d0s0  /dev/rdsk/c2t5000CCA37DC5E18Ad0s0  /dev/rdsk/c2t5000CCA37DC61E25d0s0
/dev/rdsk/c2t5000CCA369C4F888d0s0  /dev/rdsk/c2t5000CCA37DC3519Ad0s0  /dev/rdsk/c2t5000CCA37DC5E303d0s0  /dev/rdsk/c2t5000CCA37DC6275Ed0s0
/dev/rdsk/c2t5000CCA369C5026Ed0s0  /dev/rdsk/c2t5000CCA37DC4B46Fd0s0  /dev/rdsk/c2t5000CCA37DC5E343d0s0  /dev/rdsk/c2t50014EE205B5C957d0s0
/dev/rdsk/c2t5000CCA369C50370d0s0  /dev/rdsk/c2t5000CCA37DC4B7BDd0s0  /dev/rdsk/c2t5000CCA37DC5F76Ad0s0  /dev/rdsk/c2t5E83A972B7F39C50d0s0
/dev/rdsk/c2t5000CCA369C504D1d0s0  /dev/rdsk/c2t5000CCA37DC4C814d0s0  /dev/rdsk/c2t5000CCA37DC5F831d0s0  /dev/rdsk/c2t5E83A974348B629Ad0s0
/dev/rdsk/c2t5000CCA369C505D5d0s0  /dev/rdsk/c2t5000CCA37DC4C877d0s0  /dev/rdsk/c2t5000CCA37DC5F9B1d0s0  /dev/rdsk/c3t0d0s0
/dev/rdsk/c2t5000CCA369C50609d0s0  /dev/rdsk/c2t5000CCA37DC4FD78d0s0  /dev/rdsk/c2t5000CCA37DC5F9FBd0s0  /dev/rdsk/c3t10d0s0
/dev/rdsk/c2t5000CCA369C50679d0s0  /dev/rdsk/c2t5000CCA37DC52AC1d0s0  /dev/rdsk/c2t5000CCA37DC5FAD2d0s0  /dev/rdsk/c3t11d0s0
/dev/rdsk/c2t5000CCA369C50680d0s0  /dev/rdsk/c2t5000CCA37DC53296d0s0  /dev/rdsk/c2t5000CCA37DC5FB35d0s0  /dev/rdsk/c3t12d0s0
/dev/rdsk/c2t5000CCA369C506AFd0s0  /dev/rdsk/c2t5000CCA37DC532C8d0s0  /dev/rdsk/c2t5000CCA37DC5FC4Ed0s0  /dev/rdsk/c3t13d0s0
/dev/rdsk/c2t5000CCA369C506BBd0s0  /dev/rdsk/c2t5000CCA37DC532CEd0s0  /dev/rdsk/c2t5000CCA37DC5FC58d0s0  /dev/rdsk/c3t14d0s0
/dev/rdsk/c2t5000CCA369C5084Bd0s0  /dev/rdsk/c2t5000CCA37DC53322d0s0  /dev/rdsk/c2t5000CCA37DC5FCA7d0s0  /dev/rdsk/c3t15d0s0
/dev/rdsk/c2t5000CCA369C508C9d0s0  /dev/rdsk/c2t5000CCA37DC53335d0s0  /dev/rdsk/c2t5000CCA37DC5FCB0d0s0  /dev/rdsk/c3t16d0s0
/dev/rdsk/c2t5000CCA369C508E0d0s0  /dev/rdsk/c2t5000CCA37DC5335Cd0s0  /dev/rdsk/c2t5000CCA37DC5FD7Cd0s0  /dev/rdsk/c3t17d0s0
/dev/rdsk/c2t5000CCA369C508E5d0s0  /dev/rdsk/c2t5000CCA37DC5336Ed0s0  /dev/rdsk/c2t5000CCA37DC5FDA4d0s0  /dev/rdsk/c3t18d0s0
/dev/rdsk/c2t5000CCA369C508ECd0s0  /dev/rdsk/c2t5000CCA37DC53370d0s0  /dev/rdsk/c2t5000CCA37DC5FDB8d0s0  /dev/rdsk/c3t19d0s0
/dev/rdsk/c2t5000CCA369C509ECd0s0  /dev/rdsk/c2t5000CCA37DC53385d0s0  /dev/rdsk/c2t5000CCA37DC5FEABd0s0  /dev/rdsk/c3t1d0s0
/dev/rdsk/c2t5000CCA369C50F1Fd0s0  /dev/rdsk/c2t5000CCA37DC53395d0s0  /dev/rdsk/c2t5000CCA37DC5FEB4d0s0  /dev/rdsk/c3t20d0s0
/dev/rdsk/c2t5000CCA369C51558d0s0  /dev/rdsk/c2t5000CCA37DC55121d0s0  /dev/rdsk/c2t5000CCA37DC5FEC1d0s0  /dev/rdsk/c3t21d0s0
/dev/rdsk/c2t5000CCA369C5177Bd0s0  /dev/rdsk/c2t5000CCA37DC55170d0s0  /dev/rdsk/c2t5000CCA37DC5FF06d0s0  /dev/rdsk/c3t22d0s0
/dev/rdsk/c2t5000CCA369C5178Fd0s0  /dev/rdsk/c2t5000CCA37DC56D06d0s0  /dev/rdsk/c2t5000CCA37DC5FF0Ad0s0  /dev/rdsk/c3t23d0s0
/dev/rdsk/c2t5000CCA369C5190Dd0s0  /dev/rdsk/c2t5000CCA37DC56D0Ad0s0  /dev/rdsk/c2t5000CCA37DC5FF35d0s0  /dev/rdsk/c3t24d0s0
/dev/rdsk/c2t5000CCA369C52E05d0s0  /dev/rdsk/c2t5000CCA37DC56D8Ed0s0  /dev/rdsk/c2t5000CCA37DC602FCd0s0  /dev/rdsk/c3t3d0s0
/dev/rdsk/c2t5000CCA369C54C04d0s0  /dev/rdsk/c2t5000CCA37DC56E70d0s0  /dev/rdsk/c2t5000CCA37DC6032Cd0s0  /dev/rdsk/c3t4d0s0
/dev/rdsk/c2t5000CCA369C554CAd0s0  /dev/rdsk/c2t5000CCA37DC56E8Dd0s0  /dev/rdsk/c2t5000CCA37DC60345d0s0  /dev/rdsk/c3t5d0s0
/dev/rdsk/c2t5000CCA369C55766d0s0  /dev/rdsk/c2t5000CCA37DC56F33d0s0  /dev/rdsk/c2t5000CCA37DC60368d0s0  /dev/rdsk/c3t6d0s0
/dev/rdsk/c2t5000CCA369C598A7d0s0  /dev/rdsk/c2t5000CCA37DC56FB5d0s0  /dev/rdsk/c2t5000CCA37DC60AA1d0s0  /dev/rdsk/c3t7d0s0
/dev/rdsk/c2t5000CCA369C59907d0s0  /dev/rdsk/c2t5000CCA37DC56FEFd0s0  /dev/rdsk/c2t5000CCA37DC60AD4d0s0  /dev/rdsk/c3t8d0s0
/dev/rdsk/c2t5000CCA369C59910d0s0  /dev/rdsk/c2t5000CCA37DC57008d0s0  /dev/rdsk/c2t5000CCA37DC60C21d0s0  /dev/rdsk/c3t9d0s0
/dev/rdsk/c2t5000CCA369C59954d0s0  /dev/rdsk/c2t5000CCA37DC57FCAd0s0  /dev/rdsk/c2t5000CCA37DC60CAFd0s0  /dev/rdsk/c5t10d0s0
/dev/rdsk/c2t5000CCA369C599ACd0s0  /dev/rdsk/c2t5000CCA37DC58190d0s0  /dev/rdsk/c2t5000CCA37DC60CB9d0s0  /dev/rdsk/c5t11d0s0
/dev/rdsk/c2t5000CCA369C5A374d0s0  /dev/rdsk/c2t5000CCA37DC581EBd0s0  /dev/rdsk/c2t5000CCA37DC60CCBd0s0  /dev/rdsk/c5t12d0s0
/dev/rdsk/c2t5000CCA369C5A407d0s0  /dev/rdsk/c2t5000CCA37DC58576d0s0  /dev/rdsk/c2t5000CCA37DC60D34d0s0  /dev/rdsk/c5t1d0s0
/dev/rdsk/c2t5000CCA369C5A409d0s0  /dev/rdsk/c2t5000CCA37DC5881Ad0s0  /dev/rdsk/c2t5000CCA37DC60DA0d0s0  /dev/rdsk/c5t2d0s0
/dev/rdsk/c2t5000CCA369C5A416d0s0  /dev/rdsk/c2t5000CCA37DC5889Bd0s0  /dev/rdsk/c2t5000CCA37DC60E7Cd0s0  /dev/rdsk/c5t3d0s0
/dev/rdsk/c2t5000CCA369C5A41Dd0s0  /dev/rdsk/c2t5000CCA37DC5891Dd0s0  /dev/rdsk/c2t5000CCA37DC60F61d0s0  /dev/rdsk/c5t4d0s0
/dev/rdsk/c2t5000CCA369C5A420d0s0  /dev/rdsk/c2t5000CCA37DC58926d0s0  /dev/rdsk/c2t5000CCA37DC60F80d0s0  /dev/rdsk/c5t5d0s0
/dev/rdsk/c2t5000CCA369C5A42Dd0s0  /dev/rdsk/c2t5000CCA37DC58956d0s0  /dev/rdsk/c2t5000CCA37DC60FBFd0s0  /dev/rdsk/c5t6d0s0
/dev/rdsk/c2t5000CCA369C5A432d0s0  /dev/rdsk/c2t5000CCA37DC59312d0s0  /dev/rdsk/c2t5000CCA37DC6172Dd0s0  /dev/rdsk/c5t7d0s0
/dev/rdsk/c2t5000CCA369C5C19Ad0s0  /dev/rdsk/c2t5000CCA37DC59433d0s0  /dev/rdsk/c2t5000CCA37DC619DAd0s0  /dev/rdsk/c5t8d0s0
/dev/rdsk/c2t5000CCA369D347CEd0s0  /dev/rdsk/c2t5000CCA37DC59489d0s0  /dev/rdsk/c2t5000CCA37DC61D6Dd0s0  /dev/rdsk/c5t9d0s0
/dev/rdsk/c2t5000CCA37DC28966d0s0  /dev/rdsk/c2t5000CCA37DC59DAEd0s0  /dev/rdsk/c2t5000CCA37DC61D7Dd0s0

Inquiry device info

root@seal:~# sg_inq /dev/rdsk/c2t5000CCA369C47080d0s0
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  version=0x06  [SPC-4]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  Linked=0  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=74 (0x4a)   Peripheral device type: disk
 Vendor identification: ATA
 Product identification: Hitachi HDS72302
 Product revision level: A580
 Unit serial number:       MN1220F309SS9D

Identification info

root@seal:~# sg_inq -u /dev/rdsk/c2t5000CCA369C47080d0s0
SCSI_IDENT_LUN_NAA=5000cca369c47080
SCSI_IDENT_PORT_NAA=5003048001155a4d
SCSI_IDENT_PORT_RELATIVE=1

List system expanders

root@seal:~# ls /dev/es/*
/dev/es/ses0  /dev/es/ses10  /dev/es/ses12  /dev/es/ses14  /dev/es/ses2  /dev/es/ses4  /dev/es/ses6  /dev/es/ses8
/dev/es/ses1  /dev/es/ses11  /dev/es/ses13  /dev/es/ses15  /dev/es/ses3  /dev/es/ses5  /dev/es/ses7  /dev/es/ses9

Look for the SES device 1155a

root@seal:~# sg_inq -u /dev/es/ses2
SCSI_IDENT_PORT_NAA=5003048001155a7d
SCSI_IDENT_LUN_NAA=5003048001155a7d

indentify SES device

root@seal:~# sg_ses /dev/es/ses2
  LSI CORP  SAS2X36           0717
Supported diagnostic pages:
  Supported Diagnostic Pages [sdp] [0x0]
  Configuration (SES) [cf] [0x1]
  Enclosure Status/Control (SES) [ec,es] [0x2]
  Element Descriptor (SES) [ed] [0x7]
  Additional Element Status (SES-2) [aes] [0xa]
  Download Microcode (SES-2) [dm] [0xe]

SES elements descriptions

root@seal:~# sg_ses -p ed /dev/es/ses2
  LSI CORP  SAS2X36           0717
  Primary enclosure logical identifier (hex): 5003048001155a7f
Element Descriptor In diagnostic page:
  generation code: 0x0
  element descriptor by type list
    Element type: Array device slot, subenclosure id: 0 [ti=0]
      Overall descriptor: Drive Slots
      Element 0 descriptor: Slot 01
      Element 1 descriptor: Slot 02
      Element 2 descriptor: Slot 03
      Element 3 descriptor: Slot 04
      Element 4 descriptor: Slot 05
      Element 5 descriptor: Slot 06
      Element 6 descriptor: Slot 07
      Element 7 descriptor: Slot 08
      Element 8 descriptor: Slot 09
      Element 9 descriptor: Slot 10
      Element 10 descriptor: Slot 11
      Element 11 descriptor: Slot 12
      Element 12 descriptor: Slot 13
      Element 13 descriptor: Slot 14
      Element 14 descriptor: Slot 15
      Element 15 descriptor: Slot 16
      Element 16 descriptor: Slot 17
      Element 17 descriptor: Slot 18
      Element 18 descriptor: Slot 19
      Element 19 descriptor: Slot 20
      Element 20 descriptor: Slot 21
      Element 21 descriptor: Slot 22
      Element 22 descriptor: Slot 23
      Element 23 descriptor: Slot 24
    Element type: Temperature sensor, subenclosure id: 0 [ti=1]
      Overall descriptor: Temperature Sensors
      Element 0 descriptor: Temperature
    Element type: Cooling, subenclosure id: 0 [ti=2]
      Overall descriptor: Fans
      Element 0 descriptor: Fan1
      Element 1 descriptor: Fan2
      Element 2 descriptor: Fan3
      Element 3 descriptor: JBOD_Fan1
      Element 4 descriptor: JBOD_Fan2
    Element type: Audible alarm, subenclosure id: 0 [ti=3]
      Overall descriptor: Buzzers
      Element 0 descriptor: Buzzer
    Element type: Voltage sensor, subenclosure id: 0 [ti=4]
      Overall descriptor: Voltage Sensors
      Element 0 descriptor: 5V
      Element 1 descriptor: 12V
    Element type: Current sensor, subenclosure id: 0 [ti=5]
      Overall descriptor: Current Sensors
      Element 0 descriptor: 5V Line Current Sensor
      Element 1 descriptor: 12V Line Current Sensor
    Element type: Power supply, subenclosure id: 0 [ti=6]
      Overall descriptor: Power Supplies
      Element 0 descriptor: Power Supply 1
      Element 1 descriptor: Power Supply 2
    Element type: Enclosure, subenclosure id: 0 [ti=7]
      Overall descriptor: Enclosure
      Element 0 descriptor: Enclosure
    Element type: SAS expander, subenclosure id: 0 [ti=8]
      Overall descriptor: SAS Expanders
      Element 0 descriptor: Primary Expander
      Element 1 descriptor: Secondary Expander
    Element type: SAS connector, subenclosure id: 0 [ti=9]
      Overall descriptor: SAS Connectors
      Element 0 descriptor: Upstream Connector (Primary)
      Element 1 descriptor: Downstream Connector 1 (Primary)
      Element 2 descriptor: Downstream Connector 2 (Primary)
      Element 3 descriptor: Upstream Connector (Secondary)
      Element 4 descriptor: Downstream Connector 1 (Secondary)
      Element 5 descriptor: Downstream Connector 2 (Secondary)
      Element 6 descriptor: Drive Connector 00
      Element 7 descriptor: Drive Connector 01
      Element 8 descriptor: Drive Connector 02
      Element 9 descriptor: Drive Connector 03
      Element 10 descriptor: Drive Connector 04
      Element 11 descriptor: Drive Connector 05
      Element 12 descriptor: Drive Connector 06
      Element 13 descriptor: Drive Connector 07
      Element 14 descriptor: Drive Connector 08
      Element 15 descriptor: Drive Connector 09
      Element 16 descriptor: Drive Connector 10
      Element 17 descriptor: Drive Connector 11
      Element 18 descriptor: Drive Connector 12
      Element 19 descriptor: Drive Connector 13
      Element 20 descriptor: Drive Connector 14
      Element 21 descriptor: Drive Connector 15
      Element 22 descriptor: Drive Connector 16
      Element 23 descriptor: Drive Connector 17
      Element 24 descriptor: Drive Connector 18
      Element 25 descriptor: Drive Connector 19
      Element 26 descriptor: Drive Connector 20
      Element 27 descriptor: Drive Connector 21
      Element 28 descriptor: Drive Connector 22
      Element 29 descriptor: Drive Connector 23
    Element type: Communication port, subenclosure id: 0 [ti=10]
      Overall descriptor: Ethernet ports
      Element 0 descriptor: Ethernet_port_1
      Element 1 descriptor: Ethernet_port_2

and look for slot (iterate over slots)

root@seal:~# sg_ses -I 0,1 -p aes /dev/es/ses2
  LSI CORP  SAS2X36           0717
  Primary enclosure logical identifier (hex): 5003048001155a7f
Additional element status diagnostic page:
  generation code: 0x0
  additional element status descriptor list
      Element index: 1
        Transport protocol: SAS
        number of phys: 1, not all phys: 0, device slot number: 1
        phy index: 0
          device type: no device attached
          initiator port for:
          target port for: SATA_device
          attached SAS address: 0x5003048001155a7f
          SAS address: 0x5003048001155a4d
          phy identifier: 0x0

and the drive is in the Slot 2 of the SES enclosure /dev/ses2 (Front backplane JBOD1)

switch on Slot's locate led

root@seal:~# sg_ses -I 0,1 --set=locate /dev/es/ses2

query locate led status

root@seal:~# sg_ses -I 0,1 --get=locate /dev/es/ses2
1

switch off locate led

root@seal:~# sg_ses -I 0,1 --clear=locate /dev/es/ses2

query locate led status

root@seal:~# sg_ses -I 0,1 --get=locate /dev/es/ses2
0