Force a downsize of a vmdk disk

vmware-esxivmware-vmdk

I have a thick virtual disk (vmdk) file that is purely just a file-store. I currently have it configured to take up 2TB, however, there is only one 900GB partition on it. I read somewhere that the following command will force it to shrink, however, the poster said that this way is "fraught with danger":

vmkfstools -X 910G /vmfs/src_file.vmdk --force

Will this render my data innaccessible? I am only downsizing the vmdk file to free up the unpartitioned space in the ESXi datastore. Using the VMWare Tools shrink utility does not shrink the disk, it prepares it and then immediatelyn says the operation completed successfully.

Best Answer

You can always create a new virtual disk, mount both on your guest, copy the files over, mount the new smaller disk in place of the old larger disk. Once you are happy everything is right, delete the old larger disk.