qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?
Date: Thu, 5 Nov 2015 12:18:59 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Thu, Nov 05, 2015 at 05:46:01PM +0800, Fam Zheng wrote:
> Does virt-sparsify work if there is no file system present (e.g. the disk is
> fully filled with zeroes) on the device?

It doesn't do anything bad, but it doesn't currently do that.  You
could do that using:

  guestfish <<EOF
    add zeroes.img discard:enable format:raw
    run
    blkdiscard /dev/sda
  EOF

To add this to virt-sparsify, we'd need a different primitive command,
one which only trims blocks that contain zero (blkdiscard trims
everything), which we don't have right now.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]