Confused by thin vm disk using 100% space

ovjc

New Member
Jan 14, 2026
4
0
1
Hi, we have migrated several VMs (Linux and Windows) from ESXI, ans most things work well. We are using local storage only, ZFS with "mirror" on single direct NVME or LVM-thin with our older HW-RAID based Dell Servers.
However, I am confused why all disks of our fileserver still show the storage completely allocated, i.e. a 1 TB disk with 250GB data on it takes 1TB on zfs or lvm-thin.
I now understood that when importing ob restoring via VEEAM (we did both) it seems always 100% storage is allocated and I need to "repair" this manually.
Just running an fstrim in the guest seems not to be enough. I now tried the following:
  1. Issued a "cd /partition; dd if=/dev/zero of=./zeros; sync; rm ./zeros" in the vm on a 1TB filesystem with 250GB data in it sitting on an LVM-thin volume
  2. Issued "fstrim -av" which shows that 750GB of data are now "trimmed", so this worked
  3. Checked with lvdisplay: Volume usage still 100%
So what additional step needs to be done to make the LV aware of the free space? Did I miss something? Would copying the disk to a new location help? (We have guest-trim enabled and all our LVM storages are thin, resp. the ZFS storages "sparse", and we use virtio single scsi controller/disks everywhere)

Happy to get a hint what I am doing wrong or missing. JC
 
Last edited:
Yes, discard is enabled for all disks, however I only enabled it AFTER creating the disks (i.e. they were created without during the import/restore). So this perhaps will only work after moving the disk to a new destination?