Re: after snapshot-delete, the qcow2 image file size doesn't decrease

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

 



On Fri, Apr 12, 2013 at 05:25:23PM +0800, me,apporc wrote:
> After snapshot-delete, the qcow2 image file size doesn't decrease, isn't
> that a waste of disk space?

Yes, but that's life. When deleting an internal qcow2 snapshot,
QEMU will just mark the clusters as unused, it won't return them
to the underlying filesystem. These unused clusters will, however,
be re-used if the qcow2 file needs to grow later.

> Would someone please tell me how to decrease the file size when
> snapshot-delete, if that's possible?

You can't do it in place. The only option would be to use qemu-img
to clone the qcow2 file to a new qcow2 file & delete the original.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux