# [FreeNAS] ZFS iSCSI and free capacity in VMFS



## datnus (Feb 10, 2013)

Hi all,
I have use ZFS in FreeNAS 8.0.4 (based on FreeBSD) and use iSCSI to provide a LUN to Vmware ESXi 5.0.

I post it at http://forums.freenas.org/showthread.php?10990-Memory-utilization-and-performance-problem/page4, but I believe people here may have more expertise on ZFS.

FreeNAS doesn't have iSCSI unmap. I have create / move / delete virtual machine between ZFS iSCSI. *After a while, zpool list report 95% capacity used. However, Vmware shows VMFS only uses 50% capacity.*

AFAIK, when creating a virtual machine, zvol allocated disk space.
*However, when we moved / deleted virtual machine, zvol didn't update / didn't aware to update the free capacity.*

Now, I believe due to the wrong free capacity reported in zpool list, the performance is deeply affected.

*How I should do to let ZFS know the real free capacity.*

Thanks million.


----------



## Sebulon (Feb 11, 2013)

datnus said:
			
		

> Now, I believe due to the wrong free capacity reported in zpool list, the performance is deeply affected.



CanÂ´t help you with the unmapping, havenÂ´t really thought about it before to be honest. But I donÂ´t think your *performance* is affected just because you have referenced all capacity inside that zvol. zpool list will continue to say 95% but you will be able to continue to use that lun, create and delete files as much as you want until it really is full. I take it you created the lun "thin provisioned". If you instead had created it "thick", that space would have been subtracted immediately after creating the zvol instead of gradually growing.

/Sebulon


----------



## Boeri (Mar 28, 2013)

I'm also looking for SCSI UNMAP support. ZFS will support TRIM in FreeBSD 10 (and hopefully in 9.2), which can be backed by SATA TRIM or SCSI UNMAP. It seems that indeed istgt doesn't support SCSI UNMAP, I've sent a question about this to Mr. Aoyama if there is any hope this will be implemented in the future. Without this the zvol can only grow and never shrink. So it would be more than welcome to have this implemented in order to give the storage back to the pool.

Maybe the upcoming native iscsi implementation will implement this: http://www.freebsd.org/news/status/report-2012-10-2012-12.html#Native-iSCSI-Target


----------

