From: Max Reitz <mreitz@redhat.com>
To: Pascal <patatetom@gmail.com>,
nbd@other.debian.org,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] qemu-nbd
Date: Mon, 26 Mar 2018 20:14:39 +0200 [thread overview]
Message-ID: <45f3dc22-709c-7f76-20cb-b9b25c9d2c9e@redhat.com> (raw)
In-Reply-To: <CAGhAadf5A=t=0CM6bC3LaUf-53NV8PynHgQ2A5_UtL+hE5eZUg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
On 2018-03-22 13:17, Pascal wrote:
> hi everybody,
>
> when I use `qemu-nbd -s -c /dev/nbd0 /dev/sda` where are changes to
> /dev/ndb0 saved ?
> I searched in /proc/{pid_of_qemu-nbd}/ but found nothing there...
In snapshot mode, qemu (or in this case qemu-nbd) creates a temporary
qcow2 file in $TMPDIR (or /var/tmp) which will get the changes. You
should see a link to that file in /proc/$pid/fd, like this:
lrwx------. [...] 10 -> /var/tmp/vl.JjYLDm (deleted)
As you can see, the file is deleted right after it is opened, though.
If you want to have control over where the data is stored, you can just
create the overlay yourself, like so:
$ qemu-img create -f qcow2 -b /dev/sda -F raw overlay.qcow2
$ qemu-nbd -c /dev/nbd0 overlay.qcow2
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
parent reply other threads:[~2018-03-26 18:14 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAGhAadf5A=t=0CM6bC3LaUf-53NV8PynHgQ2A5_UtL+hE5eZUg@mail.gmail.com>]
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=45f3dc22-709c-7f76-20cb-b9b25c9d2c9e@redhat.com \
--to=mreitz@redhat.com \
--cc=nbd@other.debian.org \
--cc=patatetom@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).