Step-by-step
-
Create Lun of size 16Tb with affinity option
Create Lun of size 16Tb with affinity option
Refer to Appendix-A for more details.
-
Activate the partition and ensure OS boots up successfully
Activate the partition and ensure OS boots up successfully.
RHEL-8.2
-
Check for regions created by OS for volume size of 16Tb
For 16Tb volume size, OS created 8 regions. Starting region0 – region7.
Note: For presenting purposes, “ndctl list -Ru” has been pasted with multiple separate screenshots. Consider it as a single output with 8 regions.
-
Create namespace each of size equal to the region size
This can be done by omitting the ‘–size’ argument to the create-namespace command which should create a namespace spanning entire free space available in the region.
For example following command will create such a namespace on region4 of size 1636.39GiB.
# Create namspace of size equal to region size on all 8 regions.
This is an example namespace created to demonstrate device mapper creation on persistent device memory. The user can always create multiple namespaces within single region.
This is the output on screen you will see when executed with above ndctl create-namespace option.
Note: For presenting purposes, “ndctl create-name -r <region#>” ouput has been pasted with multiple separate screenshots. Consider it as a single ouput with 8 namespaces created.
-
Create LVM Physical Volume on all the persistent memory devices
# pvcreate /dev/pmem{0..7}
# Run below script to create physical volume on {0..7} persistent memory devices.
# List newly created Pvs
-
Add the Physical Volumes to a Volume Group
# vgcreate PmemVol /dev/pmem{0..7}
By running pvs the user can verify physical volumes now are associated with the new volume group “PmemVol”.
-
Create Device Mapper’s Linear Logical Volumes
To create device mapper’s linear volumes, you can specify with the new volume name using the -n option, a size using the -L option, and the volume group on which to create the logical volume.
-
Validate Logical Volumes on pmem
This will validate newly created logical volumes, UUID of pmem namespace, ndctl lists with UUID
-
Create File Systems on Logical Volume
# Create file system on logical volumes with an ext4 file system
# Finally mount with dax option, and verify the file systems mounted
#Verify the volume size of 16T with df command
-
Summary
Summary
This article outlined with using Linux Device Mapper how application can create large amounts of persistent memory than a single region/namespace can provide.The example demonstrated with 16Tb Lun creation, followed with OS populated multiple regions, and namespace creation on each of those regions. With this setup, it has shown how to use the Linux Device Mapper with Persistent Memory Devices to create a device mapper linear volume of size 16Tb.
-
Appendix-A
Appendix-A
Partition level persistent memory volume aka Lun creation
Select Persistent Memory option.
Click on “Add” to add 16Tb volume or lun, enable affinity option.
After successful Volume creation you should see 16Tb Volume created.
-
Contact Details
You can contact any of the below people for any questions on PMEM on POWER 9.
– Aneesh Kk Veetil/India/IBM, Vaibhav Jain21/India/IBM
– Harish Sriram/India/IBM, Kalpana Shetty/India/IBM