[PVE-User] zfs 0.7 no discard

Gianni Milo gianni.milo22 at gmail.com
Tue Jul 9 22:18:04 CEST 2019


On that case, I would upgrade the VM to zfs 0.8, leaving the host on zfs
0.7 with compression enabled.
Then I would run zfs trim command inside the VM and see if the space is
reclaimed back on the host.

Note: fstrim command only works on specific filesystems, not in zfs.

Gianni



On Tue, 9 Jul 2019 at 21:01, Mark Adams <mark at openvs.co.uk> wrote:

> Hi GIanni,
>
> Thanks for your response, what I forgot to mention is I am also using zfs
> inside of the VM, which I think is the main problem - I need it to be 0.8
> to actually send the discard/trim command to the underlying zfs... what I'm
> not clear on is if I need both to be 0.8.
>
> Also, I assume this can be done retrospectively ? so if I upgrade then I
> can run fstrim and it will clear the space in the host...? Maybe that
> question is better posed to the zfsonlinux list though...
>
> Cheers,
> Mark
>
> On Tue, 9 Jul 2019 at 20:53, Gianni Milo <gianni.milo22 at gmail.com> wrote:
>
> > Haven't moved to zfs 0.8 but you could have similar results by enabling
> > compression on zfs and by periodically executing fstrim (linux) or
> sdelete
> > (windows) inside VMs to reclaim unused space ?
> >
> > On Linux VMs, adding "discard" in fstab mount options (ext4) may have
> > similar results as when executing fstrim.
> >
> > On Windows 10/2012+ VMs, defrag command can be used to perform free space
> > consolidation.
> >
> > Make sure you enable "discard" option on the VM disk options tab (which
> you
> > seem to have done already).
> >
> > Check this article on wiki as well...
> > https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files
> >
> > Gianni
> >
> >
> > On Tue, 9 Jul 2019 at 09:49, Mark Adams <mark at openvs.co.uk> wrote:
> >
> > > Hi All,
> > >
> > > Currently having an issue on a few servers where more space is being
> > "used"
> > > in the host (zfs), than is actually being used inside the VM. Discard
> is
> > > enabled, but zfs 0.7 does not have support for it.
> > >
> > > zfs 0.8 has brought in discard support, so I was wondering if anyone
> else
> > > has upgraded to it to resolve this kind of issue?
> > >
> > > I realise it's in proxmox 6, but I don't want to go there until it's
> out
> > of
> > > beta.
> > >
> > > Any comments appreciated!
> > >
> > > Cheers,
> > > Mark
> > > _______________________________________________
> > > pve-user mailing list
> > > pve-user at pve.proxmox.com
> > > https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
> > >
> > _______________________________________________
> > pve-user mailing list
> > pve-user at pve.proxmox.com
> > https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
> >
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>



More information about the pve-user mailing list