How to recycle capacity when I delete files in VM? OR How to set thick provision for virtual disk

sinaamos

New Member
Apr 24, 2023
8
0
1
Details:
VM disk at local, not local -lvm (I have delete it)
Enable host and vm qemu guest agent
Virtio SCSI QCOW2
Discard = on

Problems:
When I delete files in VM, the PVE host capacity don't release, it only become larger, google said if discard = on,and enable qemu guest agent, the disk format is qcow2, we can usefstrim -avto recycle the disk capacity, but it dosen't work. Does it need lvm-thin?
I want auto release corresponding capacity when I delete files in VM, how to achieve this?

Purpose:
I don't like thin provisioning, and I am a beginner, I don't find any options to set thick provision, it always use thin provision by default. I want the virtual disk capacity is completely assignment when VM created.
 
Last edited: