On Tue, Aug 4, 2020 at 4:50 PM <jorgevisentini(a)gmail.com> wrote:
Yes, I understand, but my question is whether I can reclaim the allocated space after
deleting the snapshot. Because oVirt is not returning space, it is only increasing, even
though you have not done anything in the snapshot. That is, with each snapshot I create,
it increases 1GB, and even after deleting it, it does not reclaim this space.
This is a known issue when you remove the last snapshot with a running VM.
If you stop the VM before deleting the snapshot, this will not happen.
The only way to reclaim the space now is:
1. Stop the VM
2. Create snapshot
3. Delete the created snapshot
This will merge the new empty snapshot into the old top volume, which
has 1G extra
space for every snapshot you created in the past. Since the VM is not
running, we
can safely shrink the top volume to the optimal size after the merge.
A little better way is to call the Disk.reduce() API - this can be scripted:
1. Stop the VM
2. Reduce the disk to optimal size
3. Start the VM
Use the API:
http://ovirt.github.io/ovirt-engine-api-model/4.4/#services/disk/methods/...
Or the SDK:
http://ovirt.github.io/ovirt-engine-sdk/4.4/services.m.html#ovirtsdk4.ser...
It is possible to fix this in libvirt 6.0, and may also solve other problems
with snapshots, but this is a very delicate change.
If you think this is important to fix, please file a vdsm bug:
https://bugzilla.redhat.com/enter_bug.cgi?product=vdsm
Nir