I had this question recently regarding the best way to format volumes in a Windows 2008 Guest OS, and if there were any considerations with the different formatting types on a volume which resides on a thin provisioned VMDK. Just to be certain that what I was stating was actually true, I set up a small test. Bottom line – use quick format when formatting the volume as a normal format will fill the volume, negating the space-saving associated with thin provisioned volumes.
Let’s begin by first of all adding a few 10GB thick volumes to this VM, a Windows 2008 Guest OS. As you can see these are ‘Thick Provisioned Lazy Zero’. And as expected, when we look via the ESXi host at how much space is consumed on the VMFS volume on which the VMDK resides, we can see that there is indeed 10GB of space consumed by the flat files for these disks. This is before we do anything in the Guest OS.
OK. So now I will add 2 additional 15GB thin disks to the VM.And now when I examine the actual space consumed on the VMFS, I see that these flat files are not consuming any space as yet.Next, let’s do some tasks in the Guest OS to make these disks useful. Initially, all 4 disks (both the thick and thin) are offline and are unallocated. The 10GB ones are the thick disks, the 15GB ones are the thin disks. My first step is to bring the volumes online/initialize them. I am only doing this on the thin disks. After the disks have been initialized (not formatted), I can now see that they have begun to consume some space on the VMFS volume. Since VMFS-5 blocks are allocated in 1MB chunks, one block is needed for initialization. Now we are ready to actually format the drive. In this first test, I am going to use the ‘Quick Format’ option to initialize the volume. A quick format is the default, and it is selected automatically. This is basically clearing the table of contents on the drive, and not touching any of the data blocks.
OK. It would appear that only 91MB of the drive that was formatted using the quick format option have been consumed by that operation. So our thin provisioned datastore is still providing some value here. Let’s now proceed with formatting my other 15GB volume using a full format option (i.e. uncheck the quick format option)
The first thing you will notice is that the formatting takes a lot longer, and is a gradual process. The difference here is that the data blocks are also being zeroed out. When this format is complete, I check the amount of space consumed on the VMFS volume once again. Now you can see that the whole of my thin provisioned VMDK is consuming its full amount of allocated space, negating its thin provisioning properties.
This is the reason why VMware recommends using Quick Format when prepping drives in a Windows Guest OS if you wish to leverage the thin provisioned features of the VMDK. This is also highlighted in KB article 1005418.