Storage-class memory device nodes

Ubuntu 22.04 LTS LPAR mode

Applications access storage-class memory devices by device nodes. Normally, Ubuntu Server 22.04 LTS creates a device node for each storage increment. Alternatively, use the mknod command to create one.

The device driver uses a device name of the form /dev/scm<x> for an entire block device. In the name, <x> is one or two lowercase letters.

You can partition a block device into up to seven partitions. If you use partitions, the device driver numbers them from 1 - 7. The partitions then have device nodes of the form /dev/scm<x><n>, where <n> is a number in the range 1 - 7, for example /dev/scma1.

The following example shows two block devices, scma and scmb, where scma has one partition, scma1.
# lsblk
NAME     MAJ:MIN RM   SIZE RO MOUNTPOINT
scma     252:0    0    16G  0 
`-scma1  252:1    0    16G  0 
scmb     252:8    0    16G  0 

You must load the module before you check for the device node.

To check whether there already is a node, use for example, lsblk to list all block devices and look for "scm" entries.

To create storage-class memory device nodes issue commands of the form:
# mknod /dev/scma1 b <major> 1
# mknod /dev/scma2 b <major> 2
# mknod /dev/scma3 b <major> 3
...