Reclaiming unused VMDK space with storage thin provisioning |
Thursday, 02 July 2009 by Michel Roth | |||
I have experimented with Virtual Machine Disk Format (VMDK) thin provisioning since the beta release of vSphere 4.0 as I don't have much storage space to spare. Before we get into the nuts and bolts of what I discovered, here's some background on thin provisioning. Normally, when a 50 GB VMDK is created, it immediately eats up 50 GB of disk space on the Virtual Machine File System (VMFS) volume. Since application owners often demand more space than they truly need, there is a lot of expensive storage area network (SAN) disk capacity dedicated to these applications that will never be used. When you thin-provision a VMDK, storage is not allocated to the VMDK unless it is actually used. As long as only 10 GB of the allocated 50 GB disk is used, only 10 GB is claimed. Once the disk gets filled with data, the 50 GB that was claimed is used, which is very logical. But it is not possible to delete the data and reclaim this deleted space at storage level. Once a thin-provisioned disk grows, it won't shrink. This is not because of limitations on storage or vSphere level but because storage and vSphere don't receive the information that those blocks are empty. Windows does not delete a file when you delete it; it just updates the master file table and registers that block X to Y is now again available for writing, but the space isn't emptied. This is why neither vSphere nor storage knows that the block can be reclaimed. Some storage vendors, however, have worked on special drivers
that can interact with the guest operating system and tell the
storage that it can reclaim some blocks when the guest deletes
files.
Show/Hide comment form
|