Subscribe to Windows IT Pro
July 07, 2010 01:00 PM

Q. How can I convert a thin-provisioned disk to thick, or a thick-provisioned disk to thin, in ESX 4.0?

Windows IT Pro
InstantDoc ID #125487
Rating: (5)

A. In my previous FAQ, I talked about the differences between thick-provisioned disks and thin-provisioned disks. Thin-provisioned disks eliminate wasted disk space, but at the cost of a tiny bit of extra resource use. They also require quite a bit more monitoring to prevent the very nasty situation where your physical disks run out of space.

In your virtual administration, you may, from time to time, find the need to convert a virtual machine's (VM’s) disk from thick-provisioned to thin or vice versa. Going from thin to thick is quite easy (if you have the available storage space). Within the vSphere client, select the VM in the inventory then click its Summary tab. From there, double-click the Datastore to open the Datastore Browser console. Navigate to the correct VM’s folder and right-click the VMDK file you want to convert. Select Inflate to convert the disk.

Going from thick to thin requires a very different process, because reducing a disk’s size tends to be a more complex operation than simply adding more disk space. One way is to use Storage VMotion to create a new disk that's thin provisioned. Right-click the VM and select Migrate. When prompted for storage, select Thin Provision.

A second way, which is documented in VMware KB article 1013052, involves the use of the vmkfstools command to clone the disk and convert it to thin format. Use the syntax

 

vmkfstools –i <srcDisk> -d thin <dstDisk>

 

Got Virtual Questions? Need Virtual answers? Get ‘em here!

Related Content:

ARTICLE TOOLS

Comments
  • Foschini
    2 years ago
    Aug 20, 2010

    Good tip but how about taking it a step futher? What's the most effieicnt and effecitve way to 'shrink' a thik disk?

    "E.g. If you have an 100GB Thin Provisioned Disk with 20GB of data on it, the actual usage on the Physical Storage Device would be 20GB. If you then add an extra 40GB file to the disk it expands out to 60GB. If that 40GB file is then removed the disk will not shrink back to 20GB it will stay at 60GB."

    How do we shrink the disk down to the origjnaL 20GB after the 40 GB file has been removed?

    I found storage vmotion promtps to convert even a thin disk to thin( or same, or thick), but the vmdk's remained 'large' partially inflated. I tried fully inflating, and then thining via clone, and vmdk's remained thick. I tried shrinking a thin disk from vmtools in the OS, and the otpion was removed. Then, I thicked the thin disk, used VMtools in the guest, and shrinking partially worked. The vmdks shrunk to 30GB when used space was reported inside the OS as 20GB.

    Before I try all possible options, can you tell me what works?

  • Foschini
    2 years ago
    Aug 19, 2010

    Good tip but how about taking it a step futher? What's the most effieicnt and effecitve way to 'shrink' a thik disk?

    "E.g. If you have an 100GB Thin Provisioned Disk with 20GB of data on it, the actual usage on the Physical Storage Device would be 20GB. If you then add an extra 40GB file to the disk it expands out to 60GB. If that 40GB file is then removed the disk will not shrink back to 20GB it will stay at 60GB."

    How do we shrink the disk down to the origjnaL 20GB after the 40 GB file has been removed?

    I found storage vmotion promtps to convert even a thin disk to thin( or same, or thick), but the vmdk's remained 'large' partially inflated. I tried fully inflating, and then thining via clone, and vmdk's remained thick. I tried shrinking a thin disk from vmtools in the OS, and the otpion was removed. Then, I thicked the thin disk, used VMtools in the guest, and shrinking partially worked. The vmdks shrunk to 30GB when used space was reported inside the OS as 20GB.

    Before I try all possible options, can you tell me what works?

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.