28.2. Configuring Persistent Memory for Use as a Block Device (Legacy Mode)
To use persistent memory as a fast block device, set the namespace to sector mode.
#
ndctl create-namespace --force --reconfig=namespace1.0 --mode=sector
{ "dev":"namespace1.0", "mode":"sector", "size":17162027008, "uuid":"029caa76-7be3-4439-8890-9c2e374bcc76", "sector_size":4096, "blockdev":"pmem1s" }
In the example,
namespace1.0
is reconfigured to sector mode. Note that the block device name changed from pmem1
to pmem1s
. This device can be used in the same way as any other block device on the system. For example, the device can be partitioned, you can create a file system on the device, the device can be configured as part of a software RAID set, and the device can be the cache device for dm-cache
.