From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdFzM-0000CO-9N for qemu-devel@nongnu.org; Sun, 12 Oct 2014 06:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdFzH-0005B4-PW for qemu-devel@nongnu.org; Sun, 12 Oct 2014 06:02:56 -0400 Received: from mailpro.odiso.net ([89.248.209.98]:39970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdFzH-00056r-FW for qemu-devel@nongnu.org; Sun, 12 Oct 2014 06:02:51 -0400 Date: Sun, 12 Oct 2014 12:02:42 +0200 (CEST) From: Alexandre DERUMIER Message-ID: <03498fe6-45a9-4b14-88f4-1434e7c50acc@mailpro> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrey Korolyov Cc: Ceph Devel , Fam Zheng , qemu-devel >>Just a wild guess - Alexandre, did you tried detect-zeroes blk option >>for mirroring targets? Hi, yes, I have also tried with detect-zeroes (on or discard) with virtio a= nd virtio-scsi, doesn't help. (I'm not sure that is implemtend in drive-mir= ror). As workaround currently, after drive-mirror, I doing fstrim inside the gues= t (with virtio-scsi + discard), and like this I can free space on rbd storage. ----- Mail original ----- De: "Andrey Korolyov" =C3=80: "Fam Zheng" Cc: "Alexandre DERUMIER" , "qemu-devel" , "Ceph Devel" Envoy=C3=A9: Samedi 11 Octobre 2014 10:30:40 Objet: Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd im= age On Sat, Oct 11, 2014 at 12:25 PM, Fam Zheng wrote: > On Sat, 10/11 10:00, Alexandre DERUMIER wrote: >> >>What is the source format? If the zero clusters are actually unallocat= ed in the >> >>source image, drive-mirror will not write those clusters either. I.e. = with >> >>"drive-mirror sync=3Dtop", both source and target should have the same= "qemu-img >> >>map" output. >> >> Thanks for your reply, >> >> I had tried drive mirror (sync=3Dfull) 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 a= nd 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 sim= ply skip zero blocks. >> >> >> Or maybe this is because I'm using sync=3Dfull ? >> >> What is the difference between full and top ? >> >> ""sync": what parts of the disk image should be copied to the destinatio= n; >> possibilities include "full" for all the disk, "top" for only the sector= s >> allocated in the topmost image". >> >> (what is topmost image ?) > > For "sync=3Dtop", only the clusters allocated in the image itself is copi= ed; 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 im= age. > > Fam > -- Just a wild guess - Alexandre, did you tried detect-zeroes blk option for mirroring targets?