[SOLVED] PVE Backup Size != VM Size

AndyX90

Member
May 10, 2019
21
0
21
34
Hey guys,

i have a question regarding my Backups on PVE 6.2.
I have an Ubuntu Server 18.04-VM (seabios) running some docker containers.
The disk is on a thin-provisioned lvm-storage (SSD).
Looking in the Ubuntu-VM there are ~30GB used in the filesystem.
The backups are done to a local destination (HDD) via snapshot. Now my backups of this VM are continously growing. :-/
At the moment the uncompressed backup-size is around 180GB and takes about 40 mins.
Backups of Windows-VMs (ovmf) on the same storage are not growing continously.

Any Ideas?

THX
 
Have you enabled TRIM/Discard support in the VM? I.e. try running fstrim -v -a in the VM before the next backup.

Also, what storage type are you using for your VMs?
 
@Stefan_R Thank You very much, exactly this was the problem! Now the Backup is around 35GB.
The VMs are running on local LVM-thin storage, which are physical SSDs in a hardware-RAID-controller.
But do you have a clue why this is not happening to Windows-guests? They also have no "Discard" option set on their virtual Hard-Disks but are uefi-installed. The windows-vm reports that trim is active (fsutil behavior query DisableDeleteNotify = 0).
 
The VMs are running on local LVM-thin storage, which are physical SSDs in a hardware-RAID-controller.
That's why this happens, LVM-thin only releases allocated storage when it receives a TRIM.

But do you have a clue why this is not happening to Windows-guests? They also have no "Discard" option set on their virtual Hard-Disks but are uefi-installed. The windows-vm reports that trim is active (fsutil behavior query DisableDeleteNotify = 0).
This depends on how the OS allocates storage. If Windows is more aggressive in reusing blocks it had written before but that contain deleted files, the imapact will be reduced. Linux might prefer new blocks, even when existing but "empty" blocks are available, thus causing more new allocations on LVM-thin. I'd still recommend enabling Discard (and a periodic TRIM from inside the VM, on both Windows and Linux (e.g. via the fstrim systemd timer)) to get the most out of your LVM-thin. If your hardware RAID and host LVM are configured correctly, this might also pass the TRIM commands all the way down to the SSDs, which might make a difference in performance or longetivity.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!