No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Huawei Server Maintenance Manual 09

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
How Do I Query the Slot Number of the Hard Disk by Using Drive Letter?

How Do I Query the Slot Number of the Hard Disk by Using Drive Letter?

Question

How do I query the slot number of the hard disk by using drive letter (or logical ID)?

Answer

The query methods vary according to operating systems. The following scenarios are supported:

  • If the hard drive works in passthrough mode, you can query the slot number of the hard disk by using the drive letter.
  • If the hard drive works in RAID mode, you can query the slot numbers of all hard disks in the RAID group by using the drive letter.

Linux OS

Hard drive works in passthrough mode

Two methods are available: by using Linux CLI, or by using the InfoCollect tool to collect log files.
  • By using Linux CLI
    NOTE:
    • This section uses the faulty drive letter sdd of the hard disk in the LSI SAS3108 RAID controller card in Linux as an example. For other types of RAID controller card, only the commands used in the method are different.
    • The smartctl tool and the CLI tool of the RAID controller card configured on the server need to be installed in Linux. For details about how to install and use the CLI tool of the RAID controller card, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide.
    1. Query the serial number of the hard disk by using the SMART information

      Run the smartctl -a /dev/sdd command in the OS, and the serial number of the hard disk is displayed in Serial Number of the printed information. As shown in the following, Serial Number is 16F1K00TFJZC.

      # smartctl -a /dev/sdd
      smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.10.0-862.el7.x86_64] (local build)
      Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
      
      === START OF INFORMATION SECTION ===
      Device Model:     MG04ACA600E
      Serial Number:    16F1K00TFJZC
      LU WWN Device Id: 5 000039 6cb70234d
      Firmware Version: FSCJ
      User Capacity:    6,001,175,126,016 bytes [6.00 TB]
      Sector Sizes:     512 bytes logical, 4096 bytes physical
      Rotation Rate:    7200 rpm
      Form Factor:      3.5 inches
      Device is:        Not in smartctl database [for details use: -P showall]
      ATA Version is:   ATA8-ACS (minor revision not indicated)
      SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
      Local Time is:    Fri Jan  4 17:07:21 2019 CST
      SMART support is: Available - device has SMART capability.
      SMART support is: Enabled
    2. Query the slot number of the hard disk by using the serial number
      1. Run the following command to query the information about all hard disks, and then save the queried information as a .txt file and name it /home/slot.txt (home indicates the folder path, and slot indicates the file name, which both can be changed according to the actual path).

        storcli64 /call/eall/sall show all > /home/slot.txt

      2. In the preceding slot.txt file, find the corresponding hard disk information based on the serial number queried in step 1. /c0/e29/s5 is displayed in the information as shown in the following figure, and 5 indicates the slot number of the hard disk.
        Figure 6-1 Query the slot number of the hard disk by using the serial number
      3. (Optional) If more than one RAID controller card is equipped, repeat step 2.a and 2.b to traverse each RAID controller card until serial number queried in step 1 is found in all printed hard disk information.
      4. Run the storcli64 /c0/e29/s5 start locate command to turn on the hard drive location indicator, or search for the user guide of the corresponding server to locate the hard disk. After the location, run the storcli64 /c0/e29/s5 stop locate command to turn off the hard drive location indicator.
        NOTE:

        0, 29, and 5 of /c0/e29/s5 in the storcli64 /c0/e29/s5 start locate command respectively indicate the ID of the RAID controller card where the hard disk resides, the Enclosure ID, and slot number of the hard disk. The ID of the RAID controller card and the Enclosure ID can be found in the corresponding hard disk information queried in step 2.b.

      NOTE:

      The commands in step 2 vary according to the RAID controller cards. To query the specific commands, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide.

  • By using the InfoCollect tool to collect log files
    NOTE:
    • This section uses the faulty drive letter sdd of the hard disk in the LSI SAS3108 RAID controller card in Linux as an example. For other types of RAID controller card, only the files and commands used in the method are different.
    • The InfoCollect tool needs to be installed in Linux, and log files have been collected to local PC using the InfoCollect tool. For details about how to install the InfoCollect and collect logs, see the FusionServer Tools 2.0 InfoCollect User Guide.
    1. Query the serial number of the hard disk by using the SMART information

      In the /disk/disk_smart.txt log file which has been collected using the InfoCollect tool, find the Serial Number information by using the smartctl -a /dev/sdd searching field, where the serial number of the hard disk is displayed. As shown in the following figure, Serial Number is 16F1K00TFJZC.

      Figure 6-2 Query the serial number of the hard disk by using the SMART information
    2. Query the slot number of the hard disk by using the serial number
      1. In the /raid/sasraidlog.txt log file which has been collected using the InfoCollect tool, find the corresponding hard disk information based on the serial number queried in step 1. Slot Number in the information indicates the slot number of the hard disk.

      2. Run the storcli64 /c0/e29/s5 start locate command to turn on the hard drive location indicator, or search for the user guide of the corresponding server to locate the hard disk. After the location, run the storcli64 /c0/e29/s5 stop locate command to turn off the hard drive location indicator.
        NOTE:

        0, 29, and 5 of /c0/e29/s5 in the storcli64 /c0/e29/s5 start locate command respectively indicate the ID of the RAID controller card where the hard disk resides, the Enclosure ID, and slot number of the hard disk. The ID of the RAID controller card and the Enclosure ID can be found by searching for Adapter and Enclosure's ID: respectively in the corresponding hard disk information queried in step 2.a.

      NOTE:

      The commands, files, and paths in step 2 vary according to the RAID controller cards. To query the specific commands, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide; to query the specific files and paths, see OS Log Collection Items -> Log Collection Items of Linux in the FusionServer Tools 2.0 InfoCollect User Guide.

Hard drive works in RAID mode

Two methods are available: by using Linux CLI, or by using the InfoCollect tool to collect log files.
  • By using Linux CLI
    NOTE:
    • This section uses the faulty drive letter sdb of the hard disk in the LSI SAS3108 RAID controller card in Linux as an example. For other types of RAID controller card, only the commands used in the method are different.
    • The smartctl tool and the CLI tool of the RAID controller card configured on the server need to be installed in Linux. For details about how to install and use the CLI tool of the RAID controller card, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide.
    1. Query the target ID of the drive letter by using the block device information
      Run the ll /sys/block command in Linux, and the target ID corresponding to sdb is z displayed in targetx:y:z/ of the printed information. As shown in the following, the target ID is 0.
      # ll /sys/block
      total 0
      lrwxrwxrwx. 1 root root 0 Jan  3 19:19 dm-0 -> ../devices/virtual/block/dm-0
      lrwxrwxrwx. 1 root root 0 Jan  3 19:19 dm-1 -> ../devices/virtual/block/dm-1
      lrwxrwxrwx. 1 root root 0 Jan  3 19:19 dm-2 -> ../devices/virtual/block/dm-2
      lrwxrwxrwx. 1 root root 0 Jan  3 19:19 sda -> ../devices/pci0000:00/0000:00:11.5/ata4/host4/target4:0:0/4:0:0:0/block/sda
      lrwxrwxrwx. 1 root root 0 Jan  4 12:23 sdb -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:2:0/0:2:0:0/block/sdb
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdd -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:35/0:0:35:0/block/sdd
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdf -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:38/0:0:38:0/block/sdf
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdg -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:39/0:0:39:0/block/sdg
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdi -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:42/0:0:42:0/block/sdi
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdj -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:43/0:0:43:0/block/sdj
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdk -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:44/0:0:44:0/block/sdk
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdl -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:45/0:0:45:0/block/sdl
      lrwxrwxrwx. 1 root root 0 Jan  4 10:10 sdm -> ../devices/pci0000:17/0000:17:02.0/0000:1c:00.0/host0/target0:0:46/0:0:46:0/block/sdm
    2. Query the slot number of the hard disk by using the target ID
      1. Run the following command to query the information about all hard disks, and then save the queried information as a .txt file and name it /home/target.txt (home indicates the folder path, and target indicates the file name, which both can be changed according to the actual path).

        storcli64 /call show alilog > /home/target.txt

        NOTE:

        The command varies according to the versions of the CLI tool of the RAID controller card. Query the specific command in the CLI help information acquired by running the storcli64 -h command.

      2. In the preceding target.txt file, find the hard drive information where the Target ID is 0 by using the Target ID searching field, and then query Device IDs in this hard drive information. As shown in the following figure, Device IDs are 40, 37, 41, and 36.
        Figure 6-3 Query the Device IDs by using the target ID
      3. In the preceding target.txt file, find the hard drive information where the Device ID is 40 by using the Device ID: searching field, and then query Slot Number in this hard drive information, which indicates the slot number of the hard disk. As shown in the following figure, Slot Number is 0.
        Figure 6-4 Slot Number corresponding to Device ID: 40
      4. Repeat step 2.c to query the Slot Numbers corresponding to Device ID: 37, 41, and 36. As shown in the following figure, Slot Numbers are 1, 2 and 3 respectively.
        Figure 6-5 Slot Number corresponding to Device ID: 37
        Figure 6-6 Slot Number corresponding to Device ID: 41
        Figure 6-7 Slot Number corresponding to Device ID: 36
      5. Run the corresponding commands in the following to turn on the hard drive location indicator, or search for the user guide of the corresponding server to locate the hard disk. After the location, run the corresponding commands in the following to turn off the hard drive location indicator.
        • Commands to turn on the hard drive location indicator

          storcli64 /c0/e29/s0 start locate

          storcli64 /c0/e29/s1 start locate

          storcli64 /c0/e29/s2 start locate

          storcli64 /c0/e29/s3 start locate

        • Commands to turn off the hard drive location indicator

          storcli64 /c0/e29/s0 stop locate

          storcli64 /c0/e29/s1 stop locate

          storcli64 /c0/e29/s2 stop locate

          storcli64 /c0/e29/s3 stop locate

        NOTE:

        0, 29, and 0 of /c0/e29/s0 in the storcli64 /c0/e29/s0 start locate command respectively indicate the ID of the RAID controller card where the hard disk resides, the Enclosure ID, and slot number of the hard disk. The ID of the RAID controller card and the Enclosure ID can be found by searching for Adapter and Enclosure's ID: respectively in the corresponding hard disk information queried in step 2.a.

      NOTE:

      The commands in step 2 vary according to the RAID controller cards. To query the specific commands, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide.

  • By using the InfoCollect tool to collect log files
    NOTE:
    • This section uses the faulty drive letter sdb of the hard disk in the LSI SAS3108 RAID controller card in Linux as an example. For other types of RAID controller card, only the files and commands used in the method are different.
    • The InfoCollect tool needs to be installed in Linux, and log files have been collected to local PC using the InfoCollect tool. For details about how to install the InfoCollect and collect logs, see the FusionServer Tools 2.0 InfoCollect User Guide.
    1. Query the target ID of the drive letter by using the block device information

      In the /disk/sys_block log file which has been collected using the InfoCollect tool, find the corresponding information by using the /sys/block/sdb searching field, and the target ID is z displayed in targetx:y:z/ of the information. As shown in the following figure, target ID is 0.

      Figure 6-8 Query the target ID of the drive letter by using the block device information
    2. Query the slot number of the hard disk by using the target ID
      1. In the /raid/sasraidlog.txt log file which has been collected by using the InfoCollect tool, find the hard drive information where the Target ID is 0 by using the Target ID searching field, and then query Device IDs in this hard drive information. As shown in the following figure, Device IDs are 40, 37, 41, and 36.
        Figure 6-9 Query the Device IDs by using the target ID
      2. In the /raid/sasraidlog.txt log file which has been collected by using the InfoCollect tool, find the hard drive information where the Device ID is 40 by using the Device ID: searching field, and then query Slot Number in this hard drive information, which indicates the slot number of the hard disk. As shown in the following figure, Slot Number is 0.
        Figure 6-10 Slot Number corresponding to Device ID: 40
      3. Repeat step 2.b to query the Slot Numbers corresponding to Device ID: 37, 41, and 36. As shown in the following figure, Slot Numbers are 1, 2 and 3 respectively.
        Figure 6-11 Slot Number corresponding to Device ID: 37
        Figure 6-12 Slot Number corresponding to Device ID: 41
        Figure 6-13 Slot Number corresponding to Device ID: 36
      4. Run the corresponding commands in the following to turn on the hard drive location indicator, or search for the user guide of the corresponding server to locate the hard disk. After the location, run the corresponding commands in the following to turn off the hard drive location indicator.
        • Commands to turn on the hard drive location indicator

          storcli64 /c0/e29/s0 start locate

          storcli64 /c0/e29/s1 start locate

          storcli64 /c0/e29/s2 start locate

          storcli64 /c0/e29/s3 start locate

        • Commands to turn off the hard drive location indicator

          storcli64 /c0/e29/s0 stop locate

          storcli64 /c0/e29/s1 stop locate

          storcli64 /c0/e29/s2 stop locate

          storcli64 /c0/e29/s3 stop locate

        NOTE:

        0, 29, and 0 of /c0/e29/s0 in the storcli64 /c0/e29/s0 start locate command respectively indicate the ID of the RAID controller card where the hard disk resides, the Enclosure ID, and slot number of the hard disk. The ID of the RAID controller card and the Enclosure ID can be found by searching for Adapter and Enclosure's ID: respectively in the corresponding hard disk information queried in step 2.a.

      NOTE:

      The commands, files, and paths in step 2 vary according to the RAID controller cards. To query the specific commands, see the Huawei V5 Server RAID Controller Card User Guide or Huawei V2 and V3 Server RAID Controller Card User Guide; to query the specific files and paths, see OS Log Collection Items -> Log Collection Items of Linux in the FusionServer Tools 2.0 InfoCollect User Guide.

Translation
Download
Updated: 2019-02-25

Document ID: EDOC1000041338

Views: 80616

Downloads: 3867

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next