On VMFS datastores that do not support automatic space reclamation, you can use the esxcli command to reclaim unused storage space manually.

Prerequisites

Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.

Procedure

  1. To reclaim unused storage blocks on the thin-provisioned device, run the following command:
    esxcli storage vmfs unmap

    The command takes these options:

    Option Description
    -l|--volume-label=volume_label The label of the VMFS volume to unmap. 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. 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. An optional argument. If it is not specified, the command uses the default value of 200.
  2. To verify whether the unmap process has finished, search for unmap in the vmkernel.log file.