Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 2.43 KB

File metadata and controls

38 lines (31 loc) · 2.43 KB

Setting up Persistent Memory (PM)

App Direct mode with ext4-dax FS

Software requirements:

Step 1: PM mode selection

  • 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=AppDirect To apply the created goal, reboot the machine.
  • Verify PM regions, type and capacity: ipmctl show -region

Step 2: Namespace creation

  • 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*

Step 3: Enable dax option, create and mount the ext4-dax FS

  • The kernel has to have CONFIG_FS_DAX parameter enabled. This is done via the modules/dax.nix file.
  • Add ../modules/dax.nix in the import section of the hosts/[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 is pmem0).
  • 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.

Manual mount ext4-dax fs:

Example with the /dev/pmem0. Please, adapt accordingly.

  • Enter the following on the command line mkfs.ext4 -F /dev/pmem0 to create the file system and mount it on the PM device.
  • Enter the following on the command line mkdir /mnt/pmem0 to create a mount point.
  • Enter the following on the command line mount -o dax /dev/pmem0 /mnt/pmem0 to mount the file system with the -o dax option.

References:

  1. Intel's guide
  2. PM provision
  3. PM provision Linux