title: "VMware ESX/ESXi Virtual Disk Thin Provisioning and Thick Provisioning Conversion"
date: "2016-12-19"
tags:
- "vmware"
The conversion of VMware ESX/ESXi virtual disk from thin provisioning to thick provisioning and vice versa can be done directly using the vmkfstools command in SSH mode. When performing the conversion, it is important to backup the data.
- To convert from thin to thick, you can use the inflate mode directly.
vmkfstools -j thin2thick.vmdk
Use the vmkfstools command to inflate the disk.
# vmkfstools -j -j can be replaced with --inflatedisk
- To convert from thick to thin, you cannot directly convert it. You need to use the disk cloning method.
vmkfstools -i thick2thin.vmdk -d thin thin.vmdk
Use the vmkfstools command to clone the disk and convert the format.
# vmkfstools -i-d {thin|thick}
-i parameter: original vmdk disk name.
-i can be replaced with --clonevirtualdisk
-d {thin|thick}: format of the target disk, either thin or thick; the name of the target vmdk disk to be generated;
-d can be replaced with --diskformat
- After the conversion, you can use -x to check and repair the disk.
vmkfstools -x disktocheck.vmdk
Use the vmkfstools command to check the disk.
# vmkfstools -x -x can be replaced with --fix [check|repair]
Reference: http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-56C7F02D-E54F-4103-8DD9-1A836F509FB5.html http://bbs.51cto.com/thread-538047-1.html