I have a Win2k8 R2 guest on esxi 4.1 enterprise plus with thin provisioned vmdk. The customer let some log files get out of hand to the tune of about 80 GB of wasted space. I cleaned it up and then ran the sdelete utility with the -c option to zero the free space. I then live migrated to a new data store converting to thick, and back again converting to thin. The end result was only reducing the size by about 4 GB. For some reason the other 76 GB of wasted space has not been recovered. I tried with the guest on and off.
Any other tool I can try or am I missing a critical step?
The shrink option isn't available in thin provisioned disks. One thing I have seen recently with 4.1 is that svMotion won't reclaim space on a thin provisioned disk (even after sdelete) if you are moving between datastores of the same block size. If you can, try doing the svMotion between datastores of different block sizes and see if it resizes properly.
Try using the built-in shrink option the VMware tools provide instead of sdelete and then SVMotion the VM.
I've actually seen something similar lately on Linux VMs (cat /dev/zero) with ghettovcb to thin disks, I'm not sure if it's since the upgrade to 4.1.
The shrink option isn't available in thin provisioned disks. One thing I have seen recently with 4.1 is that svMotion won't reclaim space on a thin provisioned disk (even after sdelete) if you are moving between datastores of the same block size. If you can, try doing the svMotion between datastores of different block sizes and see if it resizes properly.
I have an empty LUN I could re-format to a new block size. Before I do that, if I change it back to thick again, will the shrink option show up in the tools?
Yes, if you inflate it back to thick then the Shrink option will work again in the VMware Tools.
If you can create an NFS datastore migration will shrink the disk. Migrate back to your other storage if necessary.
Matt Liebowitz wrote:
The shrink option isn't available in thin provisioned disks. One thing I have seen recently with 4.1 is that svMotion won't reclaim space on a thin provisioned disk (even after sdelete) if you are moving between datastores of the same block size. If you can, try doing the svMotion between datastores of different block sizes and see if it resizes properly.
That was it. I deleted one of my LUNs and recreated it as a 2 MB block size instead of 1 MB like all the rest, migrated to it and now the vm dropped down to the same size as what's really in use. Thanks!