Save and Claim the lost storage space with thin provisionning
Thin provisionning is a subject which passions me a lot. So when I saw an article written by Gabrie van Zanten. I read carefully to see if I find something that I do not know about. Believe me, I found a good stuff you’ll want to hear about. Gabrie is an experienced virtualization architect.
For persons which does not know much about Thin provisionning. When you create thin provisioned disk in ESX 4 server (let’s say for example 100Gb) it does not take 100Gb place on your SAN. It takes few Mb. Then only when you start store more and more files, this disk will start to grow.
Let say you’ll use this disk as a storage disk and you’ll want to store all your personnal collection of MP3 files there. (crazy non?).You will eat then let’s say 40 Gigs of space. Then you’ll decide to delete some of the Albums you never listen to, so you free 10 Gigs. But you see that the disk does not get back to 30 Gigs. Why? That’s where I saw the explication from Gabe….
“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. “
The main advantage over flat vmdk images is that possibility of starting small, even if the Virtual machine see the disk as a 100Gb disk. In my “lab” I’m using VMware Workstation to test stuff at home, so as Gabrie said in his article, I went to get the tool from Mark Russinovich, I put it on my c: drive, and i run a command: sdelete.exe /? to see what’s the options.

Then I took a snapshot of my VM… (you never know).
Then I runned the sdelete command and the process started. It took about 20min to finish.

Well, then I could not do a Storage vMotion as Gabe recommends… -:) I would have to setup the whole ESX 4 infrastructure on my laptop…. But this might come sometimes in the future…
4 Comments
Leave a Reply
Other posts from Server Virtualization
- Create your own Provider Virtual Data Center
- Measure some perf benchs with VMark
- VMware partners with Symantec on ApplicationHA
- Andre Leibovici's Linked cloning storage calculator
- SIOC yes, but not in the SMB kit...
- Best practices KB on how-to install ESX 4.1 and vCenter
- Hyper-V and new linux integration tools
- How to Fix “Transaction log for database ‘VIM_VCDB’ is full” errors
- How to change from ACPI Multiprocessor HAL back to ACPI Uniprocessor HAL in Windows 2003
- AD Integration for ESXi 4.1
- vCenter converter with Hyper-V import
- Serial Port handling in ESXi 4.1
- Four memory optimization techniques available in vSphere 4.1
- Activating remote access via SSH in ESXi4.1
- vSphere Compatibility Matrixes
- 150 new features or enhancements in vSphere 4.1
- Personalized install of VMware tools
- VMware tools download from VMware Website
- How to change virtual SCSI controler
- Microsoft's patch for .NET breaks VI client connection






















This tip(zero-out your disks before svmotioning) was brought to you by Yellow-Bricks.com.
http://www.yellow-bricks.com/2008/01/04/vmware-consolidated-backup-and-deleted-files/
Hi Duncan,
In my testing environement under VMware Workstation I can’t really use Storage vMotion to claim back used space … Is there any solution to “shrink” the VMDK? I used VMware Converter to re-configure the VM. This works…
Well, taking a snapshot before “nulling” the disk is nonsense, because then the .vmdk is in read-only mode and you will not get any positive effect…
What about Linux guests? Can space b claimed back?