|
@@ -171,6 +171,35 @@ guest software that this vNVDIMM device contains a region that cannot
|
|
|
accept persistent writes. In result, for example, the guest Linux
|
|
|
NVDIMM driver, marks such vNVDIMM device as read-only.
|
|
|
|
|
|
+Backend File Setup Example
|
|
|
+--------------------------
|
|
|
+
|
|
|
+Here are two examples showing how to setup these persistent backends on
|
|
|
+linux using the tool ndctl [3].
|
|
|
+
|
|
|
+A. DAX device
|
|
|
+
|
|
|
+Use the following command to set up /dev/dax0.0 so that the entirety of
|
|
|
+namespace0.0 can be exposed as an emulated NVDIMM to the guest:
|
|
|
+
|
|
|
+ ndctl create-namespace -f -e namespace0.0 -m devdax
|
|
|
+
|
|
|
+The /dev/dax0.0 could be used directly in "mem-path" option.
|
|
|
+
|
|
|
+B. DAX file
|
|
|
+
|
|
|
+Individual files on a DAX host file system can be exposed as emulated
|
|
|
+NVDIMMS. First an fsdax block device is created, partitioned, and then
|
|
|
+mounted with the "dax" mount option:
|
|
|
+
|
|
|
+ ndctl create-namespace -f -e namespace0.0 -m fsdax
|
|
|
+ (partition /dev/pmem0 with name pmem0p1)
|
|
|
+ mount -o dax /dev/pmem0p1 /mnt
|
|
|
+ (create or copy a disk image file with qemu-img(1), cp(1), or dd(1)
|
|
|
+ in /mnt)
|
|
|
+
|
|
|
+Then the new file in /mnt could be used in "mem-path" option.
|
|
|
+
|
|
|
NVDIMM Persistence
|
|
|
------------------
|
|
|
|
|
@@ -212,3 +241,5 @@ References
|
|
|
https://www.snia.org/sites/default/files/technical_work/final/NVMProgrammingModel_v1.2.pdf
|
|
|
[2] Persistent Memory Development Kit (PMDK), formerly known as NVML project, home page:
|
|
|
http://pmem.io/pmdk/
|
|
|
+[3] ndctl-create-namespace - provision or reconfigure a namespace
|
|
|
+ http://pmem.io/ndctl/ndctl-create-namespace.html
|