GZIP Backup Still Growing Larger After Half The Files In VM Deleted

toweldog

New Member
May 18, 2021
2
0
1
125
I have a postfix/dovecot VM that was around 350GB and producing a 215GB gzip backup. I went and deleted about 200GB of email from this VM and now the 150GB VM is still producing a 215GB backup. The VM is on LVM-thin with the hypervisor on LVM running on SSDs. I do not have discard selected on the disk but it is running VirtIO SCSI with fstrim running as a service every week -- it has run after removing all these files and still the backup size/time just grows and grows despite the additional free space.

Any thoughts/solutions? Thank you!
 
You have to enable discard on the disk for it to be passed down from the guest to the host storage
Thank you. Reading other posts I had believed it could be an either/or situation.

Is there any further steps beyond checking the 'discard' box for the disk in the webgui, any commands or a reboot needed afterward?

Any possible risks, e.g. for data loss? I am kind of surprised having discard on isn't the default and they don't have auto-checked.

Thanks!
 
You have to reboot the guest (shut it down completly, then boot again, or use the reboot button from PVE interface, not a simple reboot from the guest OS). There shouldn't be any risk, but it's better to take a backup before. Once the guest is rebooted, space will be reclaimed at the next fstrim run (you can run it manually if you want immediate effect)