Il 16/10/2012 13:06, Kuniyasu Suzaki ha scritto: >>>> QEMU should also convert the unused clusters to "holes" in the file >>>> > >> system, but it doesn't do that yet. >>> > > >>> > > I hope a qcow2 file is reduced automatically when a snapshot is deleted. >> > >> > Yes, that's part of the plan. The file would not reduce its size, but >> > the space would still be given back to the filesystem. > Do you plan to use a space file system?
Any file system that support holes, including ext2/3/4 or btrfs or XFS, would actually reclaim the space. > Is it difficult to reduce a qcow2 file when a snapshot is deleted? There is no guarantee that no data was allocated after the snapshot. If it was, it is not possible to reduce the qcow2 file's size without implementing some kind of "defragmentation". Paolo