There are two ways in which the disk space reclamation tasks could be invoked:
1. Verify VAAI UNMAP Support Before attempting reclamation, confirm the LUN supports the Delete Status primitive.
Delete Status: supported. If it shows unsupported, the physical array does not support SCSI UNMAP for this device.2. Execute Manual UNMAP (VMFS-5) Manual reclamation is required for VMFS-5 or if automatic reclamation is disabled on VMFS-6.
--reclaim-unit is 200 blocks. Consult storage vendors (e.g., Pure Storage, NetApp) for optimized values.3. Monitor Progress To track the reclamation progress in real-time:
esxtop.u to switch to the disk device view.f and select O to enable VAAI statistics.DELETE and MBDEL/s counters. These indicate the number of UNMAP commands issued and the throughput of the reclamation.To reclaim unused storage blocks on a VMFS datastore for a thin-provisioned device, run this command:
esxcli storage vmfs unmap -l MyDatastore
or
esxcli storage vmfs unmap -u ########-########-####-############
Notes:
VMFS-5 requires UNMAP, whereas VMFS-6 supports automatic reclamation (https://knowledge.broadcom.com/external/article/316475/migrating-vmfs-5-datastore-to-vmfs-6-dat.html).
Alternatively, you could use vmkfstools with the switch -y to reclaim unused storage blocks. Historically, this command could only be used to reclaim only a certain percentage of space, but now, this has been tweaked to accommodate blocks.
The use case would be as follows:
vmkfstools -y /vmfsPath
[--reclaimBlocksUnit #blocks]Fsimply
Example :
vmkfstools --reclaimBlocksUnit 200 -y /vmfs/volumes/vmfsPath
Notes:
Note:
Deleting a VMFS datastore from vSphere will not automatically reclaim space back into your backend storage pool, regardless of whether the LUN is thin or thick provisioned. When you Delete Datastore on ESXi, vSphere merely destroys the VMFS filesystem structure and clears the partition table. It does not send a wholesale SCSI UNMAP command to wipe the entire raw device. To the physical storage array, the LUN still exists, and any blocks that were previously written to remain occupied.The storage administrator must log into the SAN array management console and completely delete the LUN.
VMware Skyline Health Diagnostics for vSphere - FAQ
Thin Provisioning Block Space Reclamation (VAAI UNMAP) does not work