[PVE-User] Force reclaiming space on a vdisk...
Arjen
leesteken at protonmail.ch
Thu Jan 20 12:38:57 CET 2022
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.
Is autotrim enabled for the ZFS pool, or do you run zpool trim (regularly)?
Was trimming enabled for the OS inside the VM? Otherwise, you need to create a partition and trim it inside the VM.
I hope this helps a bit. Best regards, Arjen
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, January 20th, 2022 at 11:47, Marco Gaiarin <gaio at lilliput.linux.it> wrote:
> Mandi! Daniel Plominski
>
> In chel di` si favelave...
>
> > enable ZFS set compression=lz4 on the zvolume
>
> Seems just enabled:
>
> root at ctpve1:~# zpool get all rpool | grep lz4
>
> rpool feature at lz4_compress active local
>
> root at ctpve1:~# zpool get all rpool-data | grep lz4
>
> rpool-data feature at lz4_compress active local
>
> > and perform a memory limit dd run (inside the vm).
> >
> > dd if=/dev/zero of=/mountpoint_sda7/CLEANUP bs=99M count=xxx
> >
> > (this will release the storage space)
>
> OK. But i've just deleted the partitions. I have to create a new partition,
>
> format them, create a 'dd-zero' file in them and then the space will be
>
> released?
>
> Really?!
>
> I'm asking because i supposed that was the 'trim/thin' feature of ZFS to
>
> permit to shrink a disk (eg, 'don't save the unallocated space'), not the
>
> compressione feature (eg, 'don't save a bunch of consecutive zero, compress
>
> it').
>
> Speaking more clearly, i hope: i've perfectly clear that 'zeroing' a portion
>
> of a disk permit the compression feature of zfs to compress it, but i
>
> supposed that was the management of allocated spaces that make their
>
> business here... i'm only a bit puzzled.
>
> I hope someone can clarify, thanks.
>
> PS: this server have a 'Proxmox VE Community Subscription 1 CPU/year'
>
> currently active on, but i prefere if possible to use mailing list for this
>
> support question. FYI.
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Ognuno vada dove vuole andare, ognuno invecchi come gli pare
>
> ma non raccontate a me che cos'e `la LIBERTA`. (F. Guccini)
>
> pve-user mailing list
>
> pve-user at lists.proxmox.com
>
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user
More information about the pve-user
mailing list