qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: ross.zwisler@linux.intel.com, mst@redhat.com,
	qemu-devel@nongnu.org, xiaoguangrong.eric@gmail.com
Subject: Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup
Date: Mon, 29 Jul 2019 14:58:59 +0100	[thread overview]
Message-ID: <20190729135859.GD6771@stefanha-x1.localdomain> (raw)
In-Reply-To: <20190724070307.12568-1-richardw.yang@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2561 bytes --]

On Wed, Jul 24, 2019 at 03:03:07PM +0800, Wei Yang wrote:
> 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 <richardw.yang@linux.intel.com>
> ---
>  docs/nvdimm.txt | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
> index b531cacd35..baba7a940d 100644
> --- a/docs/nvdimm.txt
> +++ b/docs/nvdimm.txt
> @@ -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
'.'.

> +
> +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].

> +
> +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:

> +
> +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:

> +
> +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".

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-07-29 13:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  7:03 [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup Wei Yang
2019-07-24  7:28 ` Pankaj Gupta
2019-07-24  8:53   ` Wei Yang
2019-07-24 10:08     ` Pankaj Gupta
2019-07-24 10:17 ` Pankaj Gupta
2019-07-24 14:52   ` Wei Yang
2019-07-25  4:43     ` Pankaj Gupta
2019-07-25  4:46 ` Pankaj Gupta
2019-07-29 13:58 ` Stefan Hajnoczi [this message]
2019-07-30  0:51   ` Wei Yang
2019-07-30  6:03     ` Stefan Hajnoczi
2019-08-01  0:35       ` Wei Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729135859.GD6771@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richardw.yang@linux.intel.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).