When VMFS datastores reside on thin-provisioned LUNs, you can use the esxcli command to reclaim unused storage blocks.

In the procedure, --server=server_name specifies the target server. The specified target server prompts you for a user name and password. Other connection options, such as a configuration file or session file, are supported. For a list of connection options, see Getting Started with vSphere Command-Line Interfaces.

Install vCLI or deploy the vSphere Management Assistant (vMA) virtual machine. See Getting Started with vSphere Command-Line Interfaces. For troubleshooting, run esxcli commands in the ESXi Shell.

Reclaim unused storage blocks on the VMFS5 datastore for the thin-provisioned device by running the following command:

esxcli --server=server_name storage vmfs unmap --volume-label=volume_label|--volume-uuid=volume_uuid --reclaim-unit=number

The command takes these options:

Option

Description

-l|--volume-label=volume_label

The label of the VMFS volume to unmap. This is a mandatory argument. If you specify this argument, do not use -u|--volume-uuid=volume_uuid.

-u|--volume-uuid=volume_uuid

The UUID of the VMFS volume to unmap. This is a mandatory argument. If you specify this argument, do not use -l|--volume-label=volume_label.

-n|--reclaim-unit=number

Number of VMFS blocks to unmap per iteration. This is an optional argument. If it is not specified, the command uses the default value of 200.

Important

For additional details, see the VMware knowledge base article at http://kb.vmware.com/kb/2014849.