How to reclaim disk space on thin provisioned disk
ESXi thin disk format uses a sparse file format to allow OS layer partitions to appear larger than the physical virtual hard disk file. OS layer data deleted from the virtual hard disk file is removed from the virtual file allocation table however the contents of the file remain allocated in the virtual hard disk file, preventing the space being reclaimed by ESXi. Before the space can be reclaimed the remaining data must be set to zeros.
1. On Windows platforms the sdelete (secure delete) utility from the sys internals tool set can be used to zero deleted data. The sdelete utility should be executed using an elevated console prompt on the affected VMWare guest.
https://docs.microsoft.com/en-us/sysinternals/downloads/sdeletehttps://download.sysinternals.com/files/SDelete.zip
syntax:sdelete64 -z [target disk]e.g. sdelete64 -z c:
2. To reclaim the space, shut down the VMware guest and use vmkfstools to recover the space. vmkfstools can be executed from an ssh console on the ESXi hypervisorsyntax: vmkfstools -K [target virtual disk].vmdke.g vmkfstools -K /vmfs/datastore1/myvm/myvmvmdk
DO NOT attempt to run vmkfstools against the -flat.vmdk file.
« Go back
Powered by Help Desk Software HESK, in partnership with SysAid Technologies