When VMFS datastores reside on thin-provisioned LUNs, you can use ESXCLI commands to reclaim the unused logical blocks of a thin-provisioned LUN formatted with VMFS.
When you run the commands, you must specify the volume label --volume-label
or the volume ID --volume-uuid
but you cannot specify both.
In each iteration, the command issues unmap commands to the number of file system blocks that are specified by the optional reclaim-unit
argument, which defaults to 200.
The following examples illustrate how to use the command.
# esxcli storage vmfs unmap --volume-label datastore1 --reclaim-unit 100 # esxcli storage vmfs unmap -l datastore1 -n 100 # esxcli storage vmfs unmap --volume-uuid 515615fb-1e65c01d-b40f-001d096dbf97 --reclaim-unit 500 # esxcli storage vmfs unmap -u 515615fb-1e65c01d-b40f-001d096dbf97 -n 500
# esxcli storage vmfs unmap -l datastore1 # esxcli storage vmfs unmap -u 515615fb-1e65c01d-b40f-001d096dbf97