Creating device nodes

6.18 LPAR mode z/VM guest KVM guest

User space programs access DASDs by device nodes. Your distribution might create the device nodes for you, but you can also create your own device nodes.

About this task

If no device nodes are created for you, you must create them yourself, for example, with the mknod command. See the mknod man page for further details.

Tip: Use the device names to construct your nodes.

Example

The following nodes use the form /dev/<device_name> for the device nodes. The assignment of minor numbers is according to the following table:
Table 1. Mapping of DASD names to minor numbers

This table has two header rows. The first two entries in the top row describe device names and minor numbers, respectively, and span two columns each. The columns in the second row always describe the first and last name or minor number of a range. The fifth and last column has a single header and specifies the total number of devices in the specified range. There are 5 data rows, 4 of which describe device ranges. The final data row has a single cell with the total device count.

Name for device as a whole Minor number for device as a whole Number of devices
From To From To
dasda dasdz 0 100 26
dasdaa dasdzz 104 2804 676
dasdaaa dasdzzz 2808 73108 17,576
dasdaaaa dasdnwtl 73112 1048572 243,866
Total number of devices: 262,144
 # mknod -m 660 /dev/dasda  b 94 0
 # mknod -m 660 /dev/dasda1 b 94 1
 # mknod -m 660 /dev/dasda2 b 94 2
 # mknod -m 660 /dev/dasda3 b 94 3
 # mknod -m 660 /dev/dasdb  b 94 4
 # mknod -m 660 /dev/dasdb1 b 94 5
 ...