Reclaim iSCSI/LVM Space Options?

trystan

New Member
Dec 15, 2017
21
1
3
35
I have a thinly provisioned zvol from FreeNAS that's being served up to a proxmox host via an iSCSI extent and I have recently moved a VM's disk off of it. I've noticed(and expected) the space wouldn't automatically reclaim itself, but I'm wondering what steps I'd need to take to get that space back.

Proxmox treats it as a thick LVM so I'm wondering if I'm just out of luck.

I haven't been able to find anything 'fstrim' like that I could run from proxmox or freenas in order to instruct the zvol release its space/recompress.

Any ideas?
 
I am not totally farmilar with that enviroment, but in ours, I typically create a LV and write zero's to it to get the space back. DD is what I use to write out the zero's.
 
I spent a fair bit of time on this, but it turns out I forgot about the periodic snapshots I had running on the FreeNAS side. Containers and VMs will both relinquish their space by running fstrim (from the guest) or drive optimization in Windows as expected with thinly provisioned zvols.