How to reclaim size of thin provisioned

Scenario
When we use thin provisioned vmdk, the size of the vmdk expands as we pile up data in
the OS. But if we delete some data from OS, the reclaimed space in the OS will not be
reclaimed from the vmdk. It will continue to occupy the maximum space it have ever
used after creation.
Resolution
There is no resolution to reduce the size using vSphere client. For this you may need to
seek the help of putty or cli.
- Login to the ESXi using putty
- Browse to the vmdk location (eg: cd vmfs/volumes/datastore1/VMname
- List the available vmdk files in this location using the command:
ls –lh *.vmdk
- To know the actual size occupied by the vmdk file
< 
du –h *.vmdk
- To shrink the size of the vmdk file
vmkfstools -K AD01.vmdk
- Re check the actual size of vmdk now. 

Comments

Popular posts from this blog

esxi-host-shows-disconnected-vmware

ESXi : Lost uplink redundancy on virtual switch "vSwitch0". Physical NIC vmnic0 is down

Virtual machines appear as invalid or orphaned in vCenter Server