In vSphere 5.5 and 6.0 a new command was given to esxcli. With this command you can reclaim deleted blocks on thin-provisoned LUNs.

You could run the mechanism in production time. This might sound good…. Our maintainance windows gets smaller and smaller with every new service and if you could do maintainance when everybody could work is that great.

BUT one moment!

The ESXi host which runs the reclaim would get very high cpu usage and might costops VMs within the host. Especially the first run will take a lot of time.

The VMware KB article 2057513 describes the command which reclaims the deleted blocks on an thin-provisioned LUN in vSphere 5.5
Using esxcli in vSphere 5.5 and 6.0 to reclaim VMFS deleted blocks on thin-provisioned LUNs (2057513)

In the older versions of ESXi (5.0 und 5.1) you have to follow the VMware KB article 2014849 to reclaim the deleted blocks.
Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs (2014849)

 

To recalim the blocks in ESXi 5.5 and ESXi 6.0 you have run the following command

You have the choice to use the volume label or the volume UUID. In this example i use the volume label. The number of reclaimed blocks per iteration is optional (200 per default).

For the first easy run, we only need one information:

You will get this information in the vSphere Client. In this example the deleted blocks of Volume V1005 will be recalimed.

esx5.5_reclaim_1

If you want to use the UUID of volume V1005 the following command is necessary:

esx5.5_reclaim_2

To start the reclaim we build the command as follows:

esx5.5_reclaim_3

The command will run severall moments and ends unspectacularly.

But those who looks at the storage before and after the reclaim maybe find something like this:

Before:

esx5.5_reclaim_5

After:

esx5.5_reclaim_7

The command has freed up 30GB of deleted blocks which were allocated after their delete in the VMFS volume.