Mappings between SCSI hard drive devices and/dev/SD devices

Source: Internet
Author: User

1. Operating System: centos or RedHat


2. Check the SCSI ing from the SCSI device to/dev/SD.

# Ll/dev/Disk/by-path/
Total 0
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 0: 0->.../SDA
Lrwxrwxrwx 1 Root 10 pci-0000: 02: 00.0-scsi-0: 2: 0: 0-part1->..././sda1
Lrwxrwxrwx 1 Root 10 pci-0000: 02: 00.0-scsi-0: 2: 0: 0-part2->.../sda2
Lrwxrwxrwx 1 Root 10 pci-0000: 02: 00.0-scsi-0: 2: 0: 0-part3->.../sda3
Lrwxrwxrwx 1 Root 10 pci-0000: 02: 00.0-scsi-0: 2: 0: 0-part5->.../sda5
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 1: 0->.../SDB
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 10: 0->.../SDK
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 2: 0->.../SDC
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 3: 0->.../SDD
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 4: 0->.../SDE
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 5: 0->.../SDF
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 6: 0->.../SDG
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 7: 0->.../SDH
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 8: 0->.../SDI
Lrwxrwxrwx 1 Root 9 pci-0000: 02: 00.0-scsi-0: 2: 9: 0->.../SDJ

Take pci-0000: 02: 00.0-scsi-0: 2: 9: 0->.../SDJ as an example to analyze:

0: 2: 9: 0 represents:

PCI identifier of the host bus adapter (HBA)
Channel number on that HbA
The remote SCSI target address (target ID)
The logical unit number (Lun)


This path-based address is not persistent. it may change any time the system is reconfigured (either by on-line reconfiguration, as described in this manual, or when the system is shutdown, reconfigured, and rebooted ). it is even possible for the path identifiers to change when no physical reconfiguration has been done, as a result of timing variations during the discovery process when the system boots, or when a bus is re-scanned.
The operating system provides several non-persistent names to represent these access paths to storage devices. one is the/dev/SD name; another is the major: minor number. A third is a symlink maintained in the/dev/Disk/by-path/directory. this symlink maps from the path identifier to the current/dev/SD name.


See https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/persistent_naming.html

Https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/persistent_naming.html


3. Check the target ID through megcli and correspond to/dev/SD.

# Megacli64-cfgdsply-aall | grep 'target'
Virtual Drive: 0 (target ID: 0)
Virtual Drive: 1 (target ID: 1)
Virtual Drive: 2 (target ID: 2)
Virtual Drive: 4 (target ID: 4)
Virtual Drive: 5 (target ID: 5)
Virtual Drive: 6 (target ID: 6)
Virtual Drive: 7 (target ID: 7)
Virtual Drive: 8 (target ID: 8)
Virtual Drive: 9 (target ID: 9)
Virtual Drive: 10 (target ID: 10)
Virtual Drive: 3 (target ID: 3)


In this case, if we use megcli to find a disk with a bad track needing repair and replacement, we can know which device is the corresponding/dev/SD device.



This article is from the "jia" blog, please be sure to keep this source http://leejia.blog.51cto.com/4356849/1571396

Mappings between SCSI hard drive devices and/dev/SD devices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.