Hi everyone,
I have the same issue as in http://communities.vmware.com/thread/188141
I use ZFS to provide iSCSI LUN to Vmware ESXi 5.0.
However, the old SAN 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.
I followed the trick in the post in iSCSI LUN from ESXi
dd if=/dev/zero of=testfile bs=1024k count=50000; sync;sleep 1;sync;rm -f testfile
However the trick is not working.
How I could let zfs know the true free capacity in VMFS? Zero-out VMFS?
Thanks million.
zfs will never know the true usage, because the filesystem (VMFS) doesn't have any way to inform the volume (ZFS) that a block that supported a deleted file is no longer in use.
There is a feature to do this (the UNMAP command), but ZFS does not yet support this SCSI command.
Without UNMAP, you are out of luck.
Is there any workaround?
As the performance decreases when zfs realize free% decreases (wrongly).
I only want to zero-out or let zfs know the true free% so the performance increases and I could move VMs somewhere else faster.
Create new volume. svmotion all VMs to new volume. Delete old volume.
We have allocated all capacity in the server.
And it is too slow to storage vmotion due to the wrong free capacity in ZFS.