From: Alexandre DERUMIER <aderumier@odiso.com>
To: Fam Zheng <famz@redhat.com>
Cc: Ceph Devel <ceph-devel@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image
Date: Sun, 12 Oct 2014 12:33:45 +0200 (CEST) [thread overview]
Message-ID: <c466d530-dfb1-40a0-846d-e0c6911b2f1e@mailpro> (raw)
In-Reply-To: <20141011082535.GC4965@fam-t430.nay.redhat.com>
>>These don't tell me much. Maybe it's better to show the actual commands and how
>>you tell sparse from no sparse?
Well,
I create 2 empty source images files of 10G. (source.qcow2 and source.raw)
then:
du -sh source.qcow2 : 2M
du -sh source.raw : 0M
then I convert them with qemu-img convert : (source.qcow2 -> target.qcow2 , source.raw -> target.raw)
du -sh target.qcow2 : 2M
du -sh target.raw : 0M
(So it's ok here)
But If I convert them with drive-mirror:
du -sh target.qcow2 : 11G
du -sh target.raw : 11G
I have also double check with #df, and I see space allocated on filesystem when using drive-mirror.
I have the same behavior if target is a rbd storage.
Also I have done test again ext3,ext4, and I see the same problem than with xfs.
I'm pretty sure that drive-mirror copy zero block, qemu-img convert take around 2s to convert the empty file
(because it's skipping zero block), and drive mirror take around 5min.
----- Mail original -----
De: "Fam Zheng" <famz@redhat.com>
À: "Alexandre DERUMIER" <aderumier@odiso.com>
Cc: "qemu-devel" <qemu-devel@nongnu.org>, "Ceph Devel" <ceph-devel@vger.kernel.org>
Envoyé: Samedi 11 Octobre 2014 10:25:35
Objet: Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image
On Sat, 10/11 10:00, Alexandre DERUMIER wrote:
> >>What is the source format? If the zero clusters are actually unallocated in the
> >>source image, drive-mirror will not write those clusters either. I.e. with
> >>"drive-mirror sync=top", both source and target should have the same "qemu-img
> >>map" output.
>
> Thanks for your reply,
>
> I had tried drive mirror (sync=full) with
>
> raw file (sparse) -> rbd (no sparse)
> rbd (sparse) -> rbd (no sparse)
> raw file (sparse) -> qcow2 on ext4 (sparse)
> rbd (sparse) -> raw on ext4 (sparse)
>
> Also I see that I have the same problem with target file format on xfs.
>
> raw file (sparse) -> qcow2 on xfs (no sparse)
> rbd (sparse) -> raw on xfs (no sparse)
>
These don't tell me much. Maybe it's better to show the actual commands and how
you tell sparse from no sparse?
Does "qcow2 -> qcow2" work for you on xfs?
>
> I only have this problem with drive-mirror, qemu-img convert seem to simply skip zero blocks.
>
>
> Or maybe this is because I'm using sync=full ?
>
> What is the difference between full and top ?
>
> ""sync": what parts of the disk image should be copied to the destination;
> possibilities include "full" for all the disk, "top" for only the sectors
> allocated in the topmost image".
>
> (what is topmost image ?)
For "sync=top", only the clusters allocated in the image itself is copied; for
"full", all those clusters allocated in the image itself, and its backing
image, and it's backing's backing image, ..., are copied.
The image itself, having a backing image or not, is called the topmost image.
Fam
next prev parent reply other threads:[~2014-10-12 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54c55fc6-b12a-42e5-b99d-9752c8a9b19b@mailpro>
2014-10-08 11:15 ` [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image Alexandre DERUMIER
2014-10-11 7:01 ` Fam Zheng
2014-10-11 8:00 ` Alexandre DERUMIER
2014-10-11 8:25 ` Fam Zheng
2014-10-11 8:30 ` Andrey Korolyov
2014-10-12 10:02 ` Alexandre DERUMIER
2014-10-12 10:33 ` Alexandre DERUMIER [this message]
2014-10-12 13:02 ` Paolo Bonzini
2014-10-13 6:06 ` Alexandre DERUMIER
2014-10-13 7:06 ` Paolo Bonzini
2014-10-13 8:08 ` Alexandre DERUMIER
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=c466d530-dfb1-40a0-846d-e0c6911b2f1e@mailpro \
--to=aderumier@odiso.com \
--cc=ceph-devel@vger.kernel.org \
--cc=famz@redhat.com \
--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).