docs/nvdimm: add example on persistent backend setup
PATCH 1/1 docs/nvdimm: add example on persistent backend setup
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
docs/nvdimm.txt +28 -0
@@ -171,6 +171,32 @@ 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 is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt) + +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------
@@ -212,3 +238,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
Signature · 1 line
2.17.1
Quoted 37 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +13
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option.
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 10 lines
docs/nvdimm.txt +10
-0+ +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)
This namespace is for filesystem DAX? What if user wants to create namespace for device DAX to be used as persistent backend?
Does this makes sense to mention about by default namespace created on persistent backend?
Thanks,
Pankaj
Quoted 18 lines
docs/nvdimm.txt +5
-1+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------@@ -212,3 +238,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 --2.17.1
Quoted 39 lines · Pankaj Gupta
Quoted 39 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +15
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The
Quoted 9 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 8 lines
docs/nvdimm.txt +8
-0+block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)
Hi, Pankaj
Thanks for your comment.
Quoted 3 lines
This namespace is for filesystem DAX? What if user wants to create namespace for device DAX to be used as persistent backend?
User could choose the type (devdax/fsdax) in ndctl command line with -m option.
Quoted 3 lines
Does this makes sense to mention about by default namespace created on persistent backend?
I don't get your point. Here is an example to let user know how to create persistent backend. In case they want to get more control about the backend, they can refer to the ndctl link.
You mean it is not proper to mention the backend setup example in the document? We found many users come to us for how to setup it, so we decide to add this section.
Do you have other option?
Quoted 21 lines
Thanks,
PankajQuoted 18 lines
docs/nvdimm.txt +5
-1+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------@@ -212,3 +238,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 --2.17.1
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 54 lines
Quoted 40 lines
Quoted 40 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +15
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. TheQuoted 9 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 8 lines
docs/nvdimm.txt +8
-0+block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)Hi, Pankaj
Thanks for your comment.
Quoted 7 lines
Quoted 4 lines
This namespace is for filesystem DAX? What if user wants to create namespace for
device DAX to be used as persistent backend?User could choose the type (devdax/fsdax) in ndctl command line with -m option.
yes.
Quoted 9 lines
Quoted 5 lines
Does this makes sense to mention about by default namespace created on persistent
backend?I don't get your point. Here is an example to let user know how to create persistent backend. In case they want to get more control about the backend, they can refer to the ndctl link.
I agree this is helpful for users.
Quoted 4 lines
You mean it is not proper to mention the backend setup example in the document? We found many users come to us for how to setup it, so we decide to add this section.
Sorry! For some reason I ignored devicedax namespace information in patch. The patch looks good to me and I agree its helpful for the users.
Thanks,
Pankaj
Quoted 30 lines
Do you have other option?
Quoted 9 lines
Thanks,
PankajQuoted 6 lines
docs/nvdimm.txt +3
-0+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------Quoted 12 lines
Quoted 8 lines
docs/nvdimm.txt +2
-1@@ -212,3 +238,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 --Quoted 4 lines
2.17.1
--
Wei Yang
Help you, Help me
Quoted 37 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +13
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option.
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 10 lines
docs/nvdimm.txt +10
-0+ +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)
This is not clear to me. why 'dd' file is required in /mnt? You mean for creating a backend file?
Quoted 7 lines
docs/nvdimm.txt +3
-0+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------
docs/nvdimm.txt References
Quoted 7 lines
docs/nvdimm.txt +2
-1@@ -212,3 +238,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 --
Looks good to me. Just a small comment above.
Other than that: Reviewed-by: Pankaj Gupta <[email protected]>
Quoted 4 lines
2.17.1
Quoted 42 lines · Pankaj Gupta
Quoted 42 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +18
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX file
Quoted 9 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 5 lines
docs/nvdimm.txt +5
-0+ + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)This is not clear to me. why 'dd' file is required in /mnt? You mean for creating a backend file?
Yes, create a backend file. You need to give a file instead of a directory to qemu command line.
Quoted 6 lines
Quoted 6 lines
docs/nvdimm.txt +3
-0+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------
Quoted 12 lines
docs/nvdimm.txt References
Quoted 8 lines
docs/nvdimm.txt +2
-1@@ -212,3 +238,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 --Looks good to me. Just a small comment above.
Other than that: Reviewed-by: Pankaj Gupta <[email protected]>
Thanks
Quoted 4 lines
Quoted 4 lines
2.17.1
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 53 lines
Quoted 43 lines
Quoted 43 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +18
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX fileQuoted 9 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 5 lines
docs/nvdimm.txt +5
-0+ + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)This is not clear to me. why 'dd' file is required in /mnt? You mean for creating a backend file?
Quoted 2 lines
Yes, create a backend file. You need to give a file instead of a directory to qemu command line.
o.k
Thanks,
Pankaj
Quoted 32 lines
Quoted 7 lines
Quoted 7 lines
docs/nvdimm.txt +3
-0+ +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------Quoted 12 lines
docs/nvdimm.txt References
Quoted 8 lines
docs/nvdimm.txt +2
-1@@ -212,3 +238,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 --Looks good to me. Just a small comment above.
Other than that: Reviewed-by: Pankaj Gupta <[email protected]>Thanks
Quoted 4 lines
Quoted 4 lines
2.17.1
--
Wei Yang
Help you, Help me
Quoted 54 lines
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ guest software that this vNVDIMM device contains aregion that cannot
accept persistent writes. In result, for example, the guest Linux NVDIMM driver, marks such vNVDIMM device as read-only.docs/nvdimm.txt +26
-0+Backend File Setup Example +.......................... + +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3]. + +It is easy to setup DAX device backend file. + +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option). + +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt) + +Then the new file in /mnt could be used in "mem-path" option. + NVDIMM Persistence ------------------
docs/nvdimm.txt References
Quoted 7 lines
docs/nvdimm.txt +2
-1@@ -212,3 +238,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 --
Quoted 4 lines
2.17.1
Quoted 18 lines · Wei Yang
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 175
Quoted 5 lines
docs/nvdimm.txt +2
-0@@ -171,6 +171,32 @@ 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 +..........................
For consistency with the rest of the document please use '-' instead of '.'.
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 178
Quoted 3 lines
docs/nvdimm.txt +3
-0+ +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3].
Small grammar tweaks:
Here are two examples showing how to set up persistent backends on Linux using the tool ndctl [3].
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 180
Quoted 2 lines
docs/nvdimm.txt +2
-0+ +It is easy to setup DAX device backend file.
Please move this into the "A. DAX device" section and use it as an introduction to explain what this section is about:
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:
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 189
Quoted 9 lines
docs/nvdimm.txt +9
-0+ +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option).
Please move this into "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:
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 7 lines
docs/nvdimm.txt +7
-0+ +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)
"dd a file" could be "create or copy a disk image file with qemu-img(1), cp(1), or dd(1) in /mnt".
Hi, Stefan
Thanks for your comments :-)
Quoted 22 lines · Stefan Hajnoczi
Quoted 21 lines · Wei Yang
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ 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.
Quoted 2 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 175
Quoted 2 lines
docs/nvdimm.txt +2
-0+Backend File Setup Example +..........................
Here I use '-' because I want to say this is a sub-section of "Guest Data Persistence".
Actually, I struggled a little to pick up a proper character. Do you think '-' is the proper one?
Quoted 48 lines
For consistency with the rest of the document please use '-' instead of '.'.
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 178
Quoted 3 lines
docs/nvdimm.txt +3
-0+ +Here is two examples for how to setup these persistent backend on +linux, which leverages the tool ndctl [3].Small grammar tweaks:
Here are two examples showing how to set up persistent backends on Linux using the tool ndctl [3].
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 180
Quoted 2 lines
docs/nvdimm.txt +2
-0+ +It is easy to setup DAX device backend file.Please move this into the "A. DAX device" section and use it as an introduction to explain what this section is about:
Use the following command to set up
/dev/dax0.0so that the entirety of namespace0.0 can be exposed as an emulated NVDIMM to the guest:docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 189
Quoted 9 lines
docs/nvdimm.txt +9
-0+ +A. DAX device + + ndctl create-namespace -f -e namespace0.0 -m devdax + +The /dev/dax0.0 could be used directly in "mem-path" option. + +For DAX file, it is more than creating the proper namespace. The +block device should be partitioned and mounted (with dax option).Please move this into "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:
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 196
Quoted 7 lines
docs/nvdimm.txt +7
-0+ +B. DAX file + + ndctl create-namespace -f -e namespace0.0 -m fsdax + (partition /dev/pmem0 with name pmem0p1) + mount -o dax /dev/pmem0p1 /mnt + (dd a file with proper size in /mnt)"dd a file" could be "create or copy a disk image file with qemu-img(1), cp(1), or dd(1) in /mnt".
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 28 lines · Wei Yang
Hi, Stefan
Thanks for your comments :-)
Quoted 22 lines · Stefan Hajnoczi
Quoted 21 lines · Wei Yang
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ 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.
Quoted 8 lines
Quoted 2 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 175
Quoted 2 lines
docs/nvdimm.txt +2
-0+Backend File Setup Example +..........................Here I use '-' because I want to say this is a sub-section of "Guest Data Persistence".
Actually, I struggled a little to pick up a proper character. Do you think '-' is the proper one?
This is a .txt file without syntax. Whatever you choose might be confusing to someone. If you use a separate '-' section like the rest of the document then that avoids confusion.
Stefan
Quoted 35 lines · Stefan Hajnoczi
Quoted 34 lines · Wei Yang
Hi, Stefan
Thanks for your comments :-)
Quoted 22 lines · Stefan Hajnoczi
Quoted 21 lines · Wei Yang
Persistent backend setup requires some knowledge about nvdimm and ndctl tool. Some users report they may struggle to gather these knowledge and have difficulty to setup it properly.
Here we provide two examples for persistent backend and gives the link to ndctl. By doing so, user could try it directly and do more investigation on persistent backend setup with ndctl.
Signed-off-by Wei Yang <[email protected]>--- docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)docs/nvdimm.txt +0
-0@@ -171,6 +171,32 @@ 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.Quoted 2 lines
docs/nvdimm.txt guest software that this vNVDIMM device contains a region that cannot · line 175
Quoted 2 lines
docs/nvdimm.txt +2
-0+Backend File Setup Example +..........................Here I use '-' because I want to say this is a sub-section of "Guest Data Persistence".
Quoted 7 lines
Quoted 2 lines
Actually, I struggled a little to pick up a proper character. Do you think '-' is the proper one?
This is a .txt file without syntax. Whatever you choose might be confusing to someone. If you use a separate '-' section like the rest of the document then that avoids confusion.
Sure, let me change it. Thanks :)
Quoted 1 line
Stefan
Signature · 2 lines
Wei Yang Help you, Help me