When running VMware vSphere 6 or vSphere 7 and ESXi on your hosts with VMFS6, you may notice that auto unmap (space reclamation) is not working even though it is enabled. In addition, you’ll find that manual unmap functions still work.
Why is UNMAP not working
This is because your storage array (SAN) may have a larger unmap granularity block size than 1MB. VMFS version 6 (source) requires an unmap granularity of 1MB and does not support automatic unmap on arrays that are larger.
For example, on the HPE MSA 2040 the page size when using virtual storage is 4MB, hence auto unmap is not supported and does not work. You can still manually perform unmap on arrays with block/page sizes larger than 1MB.
Additional Information and Resources
Perform manual VMFS unmap on vSphere 6.5 and 6.7 with VMFS 6 – https://www.stephenwagner.com/2017/02/07/vmfs-unmap-command-vsphere-6-5-with-vmfs-6-auto/
vSphere 6.5, 6.7 and VMFS 6 – Change storage reclaim priority from low to medium or high – https://www.stephenwagner.com/2017/02/08/vsphere-vmfs-6-change-storage-reclaim-priority-low-medium-high/
Release unused space on host and guest filesystems with thin-provisioned Sophos UTM appliance (SW) – https://www.stephenwagner.com/2018/01/18/release-unused-space-vmdk-thin-provisioned-sophos-utm/
In vsphere 7.0 the Reclaim Granularicty is configurable ,
[root@vmhtst999:~] esxcli storage vmfs reclaim config get -l san99_vol42
Reclaim Granularity: 1048576 Bytes
Reclaim Priority: high
Reclaim Method: fixed
Reclaim Bandwidth: 100 MB/s
So 4MB should be 4,194,304 , I will check on my Storage which “BlockSize” we use and give it a try .
esxcli storage vmfs reclaim config set -l san99_vol42 –reclaim-granularity 4194304 –reclaim-method fixed –reclaim-priority high -b 100
Hi. The –reclaim-granularity option is invalid to values bigger than 1 MB. So, if you try with 4194304, you will get a “failed to update unamp properties”.