Red Hat Enterprise Linux provides a number of ways to identify storage devices. It is important to use the correct option to identify each device when used in order to avoid inadvertently accessing the wrong device, particularly when installing to or reformatting drives. Show
25.8.1. Major and Minor Numbers of Storage Devices Storage
devices managed by the The major and minor number range and associated
These reasons make it undesirable to use the major and minor number range or the associated Occasionally, however, it is still necessary to refer to the 25.8.2. World Wide Identifier (WWID)The World Wide Identifier (WWID) can be used in reliably identifying devices. It is a persistent, system-independent ID that the SCSI Standard requires from all SCSI devices. The WWID identifier is guaranteed to be unique for every storage device, and independent of the path that is used to access the device. This identifier can be obtained by issuing a SCSI Inquiry to retrieve the Device Identification Vital Product Data (page Example 25.4. WWID For
example, a device with a page scsi-3600508b400105e210000900000490000 -> ../../sda Or, a device with a page scsi-SSEAGATE_ST373453LW_3HW1RHM6 -> ../../sda Red Hat Enterprise Linux automatically maintains the proper mapping from the WWID-based device name to a current If there are
multiple paths from a system to a device, DM Multipath uses the WWID to detect this. DM Multipath then presents a single "pseudo-device" in the The command 3600508b400105df70000e00000ac0000 dm-2 vendor,product [size=20G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=0][active] \_ 5:0:1:1 sdc 8:32 [active][undef] \_ 6:0:1:1 sdg 8:96 [active][undef] \_ round-robin 0 [prio=0][enabled] \_ 5:0:0:1 sdb 8:16 [active][undef] \_ 6:0:0:1 sdf 8:80 [active][undef] DM Multipath automatically maintains the proper mapping of each WWID-based device
name to its corresponding When the In addition to these persistent names
provided by the system, you can also use 25.8.3. Device Names Managed by the udev Mechanism in /dev/disk/by-* The The kernel Generates events that are sent to user space when devices are added, removed, or changed. Theudevd serviceReceives the events. Theudev rules Specifies the action to take when the This mechanism is used for all types of devices in Linux, not just for storage devices. In the case of storage devices, Red Hat Enterprise Linux contains
Entries in this directory provide a symbolic name that refers to the storage device by a label in the contents (that is, the data) stored on the device. The blkid utility is used to read data from the device and determine a name (that is, a label) for the device. For example: /dev/disk/by-label/Boot The information is obtained from the contents (that is, the data) on the device so if the contents are copied to another device, the label will remain the same. The label can also be used to refer to the device in LABEL=Boot /dev/disk/by-uuid/ Entries in this directory provide a symbolic name that refers to the storage device by a unique identifier in the contents (that is, the data) stored on the device. The blkid utility is used to read data from the device and obtain a unique identifier (that is, the UUID) for the device. For example: UUID=3e6be9de-8139-11d1-9106-a43f08d823a6 /dev/disk/by-id/ Entries in this directory provide a symbolic name that refers to the storage device by a unique identifier (different from all other storage devices). The identifier is a property of the device but is not stored in the contents (that is, the data) on the devices. For example: /dev/disk/by-id/scsi-3600508e000000000ce506dc50ab0ad05 /dev/disk/by-id/wwn-0x600508e000000000ce506dc50ab0ad05 The id is obtained from the world-wide ID of the device, or the device serial number. The /dev/disk/by-id/scsi-3600508e000000000ce506dc50ab0ad05-part1 /dev/disk/by-id/wwn-0x600508e000000000ce506dc50ab0ad05-part1 /dev/disk/by-path/ Entries in this directory provide a symbolic name that refers to the storage device by the hardware path used to access the device, beginning with a reference to the storage controller in the PCI hierarchy, and including the SCSI host, channel, target, and LUN numbers
and, optionally, the partition number. Although these names are preferable to using major and minor numbers or /dev/disk/by-path/pci-0000:03:00.0-scsi-0:1:0:0 The /dev/disk/by-path/pci-0000:03:00.0-scsi-0:1:0:0-part1 25.8.3.1. Limitations of the |