raw image fills 100% space of thin lvm after migration

Dec 6, 2023
6
0
1
Hi everybody,

I've started a proxmox cluster with four nodes so far. Hardware is HP DL360G9 with P840 controller, 2 x 240G ssd raid-1 for proxmox, 4 x 960G raid 1+0 ssd for thin lvm storage, raids are on controller.

I've created a new VM (raw) on thin lvm storage on whatever node, and thin provisioning works fine after initial vm creation, lvs command shows on Data column about 20% usage.

But after migrating this machine on a different node, lvs shows 100%, which is not ok. I expect that after migration any VM to take as much space as data on VM file system, not the size on their disk.

I repeated this with same result.

What seems to be the problem? My experience with proxmox is minimal so far, thanks!
 
You need to run a discard inside the VM in order to free up the unused space again. There is an option to automatically discard on migration if you have the QEMU Guest Agent installed inside the VM.
 
Hi Stefan, thank you! It does free space on host, after I trim inside VM.

Still, I cannot find automatically discard on migration option, could you please point me to it?

Thanks a ton!
 
You need to click on the respective VM > Options > double-click QEMU Agent and there check 'Run guest-trim after a disk move or VM migration'. This needs the QEMU Agent installed and running inside the VM.
 
Last edited:
Stefan, thanks a ton! I see this option now.

For the moment I've decided to try to use same servers with NFS, rather that Thin LVM, and reinstalled all, re-created cluster and so on.