[SOLVED] VM backup size a lot larger than VM used space

Rayures

Active Member
Apr 14, 2020
15
0
41
45
Hi there,

something is going on, that i do not yet understand.

i am backuping a VM (zstd). this gives me a backup file of 46GB. This is a lot, because the VM only has about 11GB in use.

on VM:

df -lhT
Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  2.9G     0  2.9G   0% /dev
tmpfs          tmpfs     597M  8.6M  588M   2% /run
/dev/sda1      ext4      121G  5.6G  109G   5% /
tmpfs          tmpfs     3.0G     0  3.0G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     3.0G     0  3.0G   0% /sys/fs/cgroup
tmpfs          tmpfs     355M     0  355M   0% /run/user/1000
so, about 11GB in use.

when i look on the pve host at the vm disk:

zfs list -o space
Code:
NAME                   AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
ZFSdata/vm-188-disk-0   290G  92.0G        0B   92.0G             0B         0B
that is 92GB....

why is de VM disk 92GB when the VM only has 11GB in use? What is going on here? How to reduce this?


//edit

for some reason it looks like debian did not do TRIM automatically (discard is enabled in vm). I ran it manually in the VM:
Code:
sudo /sbin/fstrim --all || true

result:
Code:
NAME                    USED  AVAIL     REFER  MOUNTPOINT
ZFSdata/vm-188-disk-0  6.89G   376G     6.89G  -
 
Last edited: