Comment 4 for bug 1025244

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

First going back to the original bug, in that instance you kept around many snapshots. In that case there is no way to avoid having many snapshots of, say, a 2G disk, taking much more space than 2G.

The thing that concerned me in this bug was that disk space was never reclaimed.

I don't believe that this is the case when no snapshots are used. If you create a new qcow2 image with 2G size, then that image will not exceed 2G on disk.

Once you introduce snapshots, this appears to complicate the bookkeeping such that automatic resizing of the disk image is not done. The data *is* reference counted however, This means that you can create a new, trimmed qcow2 image based on the original by doing

qemu-img convert -f qcow2 -O qcow2 original.qcow2 new.qcow2

As I don't believe the automatic freeing of disk space was ever implemented, I am going to mark this bug Triaged/Low, to mark it as a desirable feature. I'll also mark it as affecting the upstream project.