Software requirements:
- Inspect the memory modules topology:
ipmctl show -topology - Inspect the memory modules state after reboot:
ipmctl show -memoryresources - Create a goal to change PM to AppDirect mode:
ipmctl create -goal PersistentMemoryType=AppDirectTo apply the created goal, reboot the machine. - Verify PM regions, type and capacity:
ipmctl show -region
- Inspect the available PM regions:
ndctl list --regions --human - Create namespaces:
sudo ndctl create-namespace --mode fsdax -r all - Verify the created namespaces:
ndctl list --human - Verify the created devices which are listed as
/dev/pmem*
- The kernel has to have
CONFIG_FS_DAXparameter enabled. This is done via themodules/dax.nixfile. - Add
../modules/dax.nixin the import section of thehosts/[machine_name].nix(similarly to jack). Note that you should provide the appropriate PM devices that should be created and mounted with dax filesystem (default ispmem0). - Deploy the new config on the machine. Be patient. The kernel is rebuilt.
- Reboot the machine.
- PM is now mounted with ext4-dax on
/mnt/pmem*directories.
Example with the /dev/pmem0. Please, adapt accordingly.
- Enter the following on the command line
mkfs.ext4 -F /dev/pmem0to create the file system and mount it on the PM device. - Enter the following on the command line
mkdir /mnt/pmem0to create a mount point. - Enter the following on the command line
mount -o dax /dev/pmem0 /mnt/pmem0to mount the file system with the -o dax option.
References: