[PVE-User] Force reclaiming space on a vdisk...

Marco Gaiarin gaio at lilliput.linux.it
Fri Jan 21 11:03:13 CET 2022


Mandi! Arjen via pve-user
  In chel di` si favelave...

> When discard is enabled on the virtual disk and also the OS inside the VM executes trim commands for deleted data, then it should inform ZFS that the blocks are free. Marking blocks as usused will not work without the help of the OS inside the VM.

OK. So, speking practically:

a) i've do the wrong things, deleting the partitions, because the guest OS
 had not the opportunity to reclaim free space; because trim/discard need
the cooperation of all the 'chain', probably it was needed to delete all the
file in the partition, the trim them, then delete them.

b) if the guest OS does not support trim, or support wrongly/buggy, the same
 result will be achieved (creating and) zeroing the partition, if
conpression are enabled. This does not involve trim/discard, but only
compression, acheving the same result indeed.


> Was trimming enabled for the OS inside the VM? Otherwise, you need to create a partition and trim it inside the VM.

Guest os support fstrim, so i'll try a).


Thanks.

-- 
  Con Windows sei in vacanza: ti diverti senza pensare a ciò che fai,
  ma dopo un po' finisce. In Linux entri nella vita reale:
  Devi tirar fuori le palle!				(Alain Modolo)






More information about the pve-user mailing list