Monday, November 18, 2013

Reclaim VMDK space from thin disk on ESXi 5.0/5.1/5.5

There are 2 methods but both need you system to power down.

1. Use VMware convertor, it is free, but need to rename your VM and GUID also changed. It is not a very good choice if you have all those VM backup software that recognize GUID instead of VM Name  (However, I have tested both, it give the best result for reclaiming space, especially some space in LVM will not be able to be reclaimed by method 2 )

2. Do it Manually in 2 steps
- zero out all empty space (Windows sdelete, Linux secure-delete)
        Linux: execute "sfill -llfzv /" after installing secure-delete  (you might want to zero out swap also)
        Windows: "sdelete -z" (downloaded from microsoft technet)
- hole punching using vmkfstools in ESXi
         SSH into ESXi host and run this command: vmkfstools -K <vmdkname>

**if space not able to reclaim, try storage vmotion to thick then thin to force it happens.







1 comment:

  1. Hi Calvin - I have an issue . I have virtual machines on SUSE Linux which have filesystem "/java/shared" created and mapped to a datastore "JAVA_SHARED" .All VM's are thin provisioned and hence VMDK residing under datastore is also thin.The datastore seems to be getting full. Hence the junk data on the Suse Filesystem was cleaned and percentage dropped to 8% at OS level but at datastore level it still shows occupied. How to reclaim space at datastore level??

    ReplyDelete