How to reclaim size of a thin provisioned vmdk file in ESXi 5.0?
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:
- To know the actual size occupied by the vmdk file
du –h *.vmdk
vmkfstools -K AD01.vmdk
- Re check the actual size of vmdk now. You will see the difference !!!
is there any chance of losing the data if we shrink the vmdk file?
ReplyDeletethanks in advance!