Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary
    ACOS 6.2.0
  • Acrfra Cloud Operation System cluster>
  • ACOS operations and maintenance>
  • For physical disks>
  • Locating a physical disk

Locating using the command line

The commands and procedures used to flash the locator light vary with the driver type of the physical disk, as shown in the table below.

Physical disk driverCommand line
ahciledctl
mpt2sassas2ircu
mpt3sasstorcli or perccli (DELL)
megaraid_sasstorcli or perccli (DELL)
smartpqiarcconf

Procedure

  1. Run the following command to check the driver type of the physical disk. Here, the physical disk sdx is used as an example:

    udevadm info -a -n /dev/sdx | grep DRIVERS | egrep 'ahci|megaraid_sas|mpt2sas|mpt3sas|smartpqi|nvme'

    If the disk uses the ahci driver, the output is as follows. For other driver types, the output will differ accordingly.

    DRIVERS=="ahci"

  2. Check the serial number of the physical disk.

    For physical disks using the mpt2sas, mpt3sas, megaraid_sas, or smartpqi driver, you need to locate the slot number of this disk using its serial number.

    Operation Command Output

    Viewing the serial number of a physical disk

    (Take the physical disk sdx as an example)

    smartctl -i /dev/sdx | grep Serial Serial Number: W462CK1F

    Viewing the serial numbers of all physical disks

    lsblk -d -o NAME,SERIAL NAME SERIAL sda 96D70756062400160899 sdb BTHV519309ZA400NGN sdc BTHV5194065D400NGN sdd W462CK1F sde W462MH8S sdf W462MH87 sdg W462CKCD
  3. Flash or turn off the locator light of the physical disk.

    • ahci driver

      (Take the physical disk sdx as an example):

      • Light flash

        ledctl locate=/dev/sdx

      • Light off

        ledctl locate_off=/dev/sdx

    • mpt2sas driver

      For physical disks using the mpt2sas driver, you need to obtain controller_id, enclosure_id, and slot_id of the physical disk for flashing or turning off the locator light.

      1. Run the sas2ircu list command, and the output is displayed as follows, where the number under the Index column is controller_id.

        LSI Corporation SAS2 IR Configuration Utility.
        Version 15.00.00.00 (2012.11.08)
        Copyright (c) 2009-2012 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:02h:00h:00h      1170h   6019h
        
        SAS2IRCU: Utility Completed Successfully.
      2. Obtain enclosure_id and slot_id based on controller_id obtained from the previous step.

        sas2ircu ${controller_id} display | egrep "Enclosure #|Slot #|Serial No" | grep -v Unit

        After the command is executed, the output is displayed as follows, where Enclosure #, Slot#, and Serial No are listed in combination, representing enclosure_id, slot_id, and the physical disk serial number, respectively. You can identify the corresponding slot number by matching the previously obtained serial number.

        Enclosure #                             : 1
        Slot #                                  : 0
        Serial No                               : BTHV522308T3400NGN
        Enclosure #                             : 1
        Slot #                                  : 1
        Serial No                               : BTHV522301VC400NGN
        Enclosure #                             : 1
        Slot #                                  : 2
        Serial No                               : W461T787
        Enclosure #                             : 1
        Slot #                                  : 3
        Serial No                               : W461SGBK

        Once controller_id, enclosure_id, and slot_id of the physical disk are obtained, you can proceed with flashing or turning off the locator light.

      3. Flash the locator light or turn off the locator light.

        • Light flash

          sas2ircu $controller_id locate $enclosure_id:$slot_id on
          For example, to flash the locator light on the physical disk whose controller_id equals 0, enclosure_id equals 1, and slot_id equals 0, run this command: sas2ircu 0 locate 1:0 on.

        • Light off

          sas2ircu $controller_id locate $enclosure_id:$slot_id on
          For example, to turn off the locator light on the physical disk whose controller_id equals 0, enclosure_id equals 1, and slot_id equals 3, run this command: sas2ircu 0 locate 1:3 off.

    • mpt3sas and megaraid_sas drivers

      For physical disks using the mpt3sas or megaraid_sas driver, you need to obtain the slot information before flashing or turning off the locator light.

      • For DELL servers, run the perccli command;
      • For other servers, run the storcli command.

      The usage and output of perccli and storcli are largely the same. When running either command, ensure that you have entered the full command path. The following takes the perccli command as an example to describe how to obtain the slot information of a physical disk.

      1. Run the following command to list the slot and serial numbers of the physical disk:

        /opt/MegaRAID/perccli/perccli64 /call/eall/sall show all | egrep "Device attributes|SN ="

        After the command is executed, the output is displayed as follows, where Device and SN are listed in pairs, representing the physical disk slot number and the corresponding physical disk serial number.

        Drive /c0/e4/s0 Device attributes :
        SN = 61K0A1KFFQYF
        Drive /c0/e4/s1 Device attributes :
        SN = 61K0A1LKFQYF
      2. Flash the locator light or turn off the locator light.

        • Light flash

          /opt/MegaRAID/perccli/perccli64 /cx/ex/sx start locate
          For example, to flash the locator light on the physical disk that lies in the /c0/e1/s1 slot, run this command: /opt/MegaRAID/perccli/perccli64 /c0/e1/s1 start locate.

        • Light off

          /opt/MegaRAID/perccli/perccli64 /cx/ex/sx stop locate
          For example, to turn off the locator light on the physical disk that lies in the /c0/e1/s1 slot, run this command: /opt/MegaRAID/perccli/perccli64 /c0/e1/s1 stop locate.

    • smartpqi driver

      For physical disks using the smartpqi driver, you need to obtain controller_id, channel_id, and device_id of the physical disk for flashing or turning off the locator light.

      1. Run the /usr/Arcconf/arcconf list command, and the output is displayed as follows, where the number under the Controller ID column is controller_id. When running the arcconf command, ensure that you have entered the full command path.

        Controllers found: 1
        ----------------------------------------------------------------------
        Controller information
        ----------------------------------------------------------------------
        Controller ID             : Status, Slot, Mode, Name, SerialNumber, WWN
        ----------------------------------------------------------------------
        Controller 1:             : Optimal, Slot 11, Mixed, INSPUR PM 8222-SHBA, SAMA22GP3910A60, 56C92BF000A1C676
        
        Command completed successfully.
      2. Obtain channel_id and device_id based on controller_id obtained from the previous step.

        /usr/Arcconf/arcconf getconfig ${controller_id} pd | egrep "Reported Channel|Serial number"

        After the command is executed, the output is displayed as follows, where Channel, Device, and Serial number are listed in pairs, representing channel_id, device_id, and the physical disk serial number, respectively. You can identify the corresponding slot number by matching the previously obtained serial number.

        Reported Channel,Device(T:L)         : 0,0(0:0)
        Serial number                        : 5QHMR5PB
        Reported Channel,Device(T:L)         : 0,1(1:0)
        Serial number                        : 5QHMWGXB
        Reported Channel,Device(T:L)         : 0,2(2:0)
        Serial number                        : 5QHNPB5B
        Reported Channel,Device(T:L)         : 0,3(3:0)
        Serial number                        : 5QHL8DMB
        Reported Channel,Device(T:L)         : 2,0(0:0)

        The following information can be obtained from the example output: the physical disk with Serial number 5QHMR5PB has channel_id equal to 0 and device_id equal to 0; the physical disk with Serial number 5QHMWGXB has channel_id equal to 0 and device_id equal to 1, and similarly for other disks.

      3. Flash the locator light or turn off the locator light.

        • Light flash

          /usr/Arcconf/arcconf identify ${controller_id} device ${channel_id} ${device_id} start

          For example, flash the locator light on a physical disk with controller_id equal to 0, channel_id equal to 1, and device_id equal to 1, run this command: /usr/Arcconf/arcconf identify 0 device 1 1 start.

        • Light off

          /usr/Arcconf/arcconf identify ${controller_id} device ${channel_id} ${device_id} stop

          For example, turn off the locator light on a physical disk with controller_id equal to 0, channel_id equal to 1, and device_id equal to 2, run this command: /usr/Arcconf/arcconf identify 0 device 1 2 stop.