`qvm-backup` makes backup with size much bigger than data qube actually has. Fragmentation?

I have a qube, it is usual PVH, template-based, default kernel, I see nothing special.

And it has:

  • private storage max size 160 GiB (I’ve been using this space, but later removed data from it).
  • actual data on /rw: ~ 0.1 GiB
  • partition/ is default 9.6 GiB.

I would expect the resulting backup of the qube to be about 0.1 GiB, as happens with all other qubes, but in case of these one qvm-backup produces backup of 20 GiB size.

How can I get it smaller?
Is it some LVM-thin-provisioning problem?

Is this from looking at it inside the VM, or is it equally small if you check with qvm-volume info VMNAME:private usage in dom0?

If that command reports a much larger (byte) size than expected even after accounting for filesystem overhead, try running sudo fstrim /rw inside the VM.

It is according to df -h.
Your command shows huge size (28 GiB).

sudo fstrim -v /rw
/rw: 0 B (0 bytes) trimmed

I also run sudo fstrim -av as @brendanhoar suggests here (so I hope it will not affect other partitions in any bad way), but the output was similar: 0 bytes trimmed. Nonetheless, after shutdown of the qube its size according to qvm-volume was reduced 100 times! Strange.
I thought fstrim is about ssd TRIM, was not thinking about effects on LVM.

So, thank you, @rustybird.

I am still curious, why was it happening in the first place, why isn’t fstrim scheduled (I am using template based on fedora-minimal, maybe that is the reason).