Finding the minor number for a DCSS device

SUSE Linux Enterprise Server 15 SP5 z/VM guest

When you add a DCSS device, a minor number is assigned to it.

About this task

Unless you use dynamically created device nodes as provided by udev, you might need to know the minor device number that has been assigned to the DCSS.

When you add a DCSS device, a directory of this form is created in sysfs:
/sys/devices/dcssblk/<dcss-name>
where <dcss-name> is the DCSS name that represents the DCSS device.

This directory contains a symbolic link, block, that helps you to find out the device name and minor number. The link is of the form ../../../block/dcssblk<n>, where dcssblk<n> is the device name and <n> is the minor number.

Example

To find out the minor number that is assigned to a DCSS device that is represented by the directory /sys/devices/dcssblk/MYDCSS issue:
# readlink /sys/devices/dcssblk/MYDCSS/block
../../../block/dcssblk0
In the example, the assigned minor number is 0.