DASD device nodes

Red Hat Enterprise Linux 8.6 LPAR mode z/VM guest KVM guest

Red Hat® Enterprise Linux® 8.6 uses udev to create multiple device nodes for each DASD that is online.

Device nodes based on device names
udev creates device nodes that match the device names used by the kernel. These standard device nodes have the form /dev/<name>.

The mapping between standard device nodes and the associated physical disk space can change, for example, when you reboot Linux. To ensure that you access the intended physical disk space, you need device nodes that are based on properties that identify a particular DASD.

udev creates additional devices nodes that are based on the following information:
  • The bus ID of the disk
  • The disk label (VOLSER)
  • The universally unique identifier (UUID) of the file system on the disk
  • If available: The label of the file system on the disk
Device nodes based on bus IDs
udev creates device nodes of the form
/dev/disk/by-path/ccw-<device_bus_id>
for whole DASD and
/dev/disk/by-path/ccw-<device_bus_id>-part<n>
for the <n>th partition.
Device nodes that are based on VOLSERs
udev creates device nodes of the form
/dev/disk/by-id/ccw-<volser>
for whole DASD and
/dev/disk/by-id/ccw-<volser>-part<n>
for the <n>th partition.

If you want to use device nodes based on VOLSER, be sure that the VOLSERs in your environment are unique. VOLSERs are included in the volume label.

If you assign the same VOLSER to multiple devices, Linux can still access each device through its standard device node. However, only one of the devices can be accessed through the VOLSER-based device node. Thus, the node is ambiguous and might lead to unintentional data access.

Furthermore, if the VOLSER on the device that is addressed by the node is changed, the previously hidden device is not automatically addressed instead. To reassign the node, you must reboot Linux or force the kernel to reread the partition tables from disks, for example, by issuing:
# blockdev --rereadpt /dev/dasdzzz

You can assign VOLSERs to ECKD type devices with dasdfmt when formatting or later with fdasd when creating partitions.

Device nodes based on file system information
udev creates device nodes of the form
/dev/disk/by-uuid/<uuid>
where <uuid> is the UUID for the file system in a partition.
If a file system label exists, udev also creates a node of the form
/dev/disk/by-label/<label>

There are no device nodes for the whole DASD that are based on file system information.

If you want to use device nodes that are based on file system labels, be sure that the labels in your environment are unique.

Additional device nodes
/dev/disk/by-id contains additional device nodes for the DASD and partitions, that are all based on a device identifier as contained in the uid attribute of the DASD.
Note: If you want to use device nodes that are based on file system information and VOLSER, be sure that they are unique for the scope of your Linux instance. This information can be changed by a user or it can be copied, for example when backup disks are created. If two disks with the same VOLSER or UUID are online to the same Linux instance, the matching device node can point to either of these disks.

Example

For a DASD that is assigned the device name dasdzzz, has two partitions, a device bus-ID 0.0.b100 (device number 0xb100), VOLSER LNX001, and a UUID 6dd6c43d-a792-412f-a651-0031e631caed for the first and f45e955d-741a-4cf3-86b1-380ee5177ac3 for the second partition, udev creates the following device nodes:

For the whole DASD:
  • /dev/dasdzzz (standard device node according to the DASD naming scheme)
  • /dev/disk/by-path/ccw-0.0.b100
  • /dev/disk/by-id/ccw-LNX001
For the first partition:
  • /dev/dasdzzz1 (standard device node according to the DASD naming scheme)
  • /dev/disk/by-path/ccw-0.0.b100-part1
  • /dev/disk/by-id/ccw-LNX001-part1
  • /dev/disk/by-uuid/6dd6c43d-a792-412f-a651-0031e631caed
For the second partition:
  • /dev/dasdzzz2 (standard device node according to the DASD naming scheme)
  • /dev/disk/by-path/ccw-0.0.b100-part2
  • /dev/disk/by-id/ccw-LNX001-part2
  • /dev/disk/by-uuid/f45e955d-741a-4cf3-86b1-380ee5177ac3