VMware Cloud Community
Lackey11
Contributor
Contributor

Recover space on VMDK-thin provisioning

Running ESXI 4.1 netapp fs2020 storage at the backend.

All my Vms are running in a NFS setup with thin provisioning.

If I gave my VMs a storage of 500GB to start but its only using about 150GB.. The VMDK should correspond to that 150GB and provisioned Size to be 500GB be shown when I browse the datastore, correct?

So the question here, if my VMDK grows to about 400GB it should show within Vsphere when I browse but when I delete files to lower the space from 400GB down to 200GB within my VMDK. How come within VShpere or Netapp filer, it does not reflect this as well? As this will help with my overall storage space.

I am missing something that I am not doing right in terms of managing my Vm space/storage space?

How do I go about recovering that 200GB storage?

Thanks

0 Kudos
5 Replies
rickardnobel
Champion
Champion

Lackey11 wrote:

but when I delete files to lower the space from 400GB down to 200GB within my VMDK. How come within VShpere or Netapp filer, it does not reflect this as well?

The main problem is that neither ESXi or your Netapp knows what the guest operating system is doing with the internal file system. When you delete files then most operating systems will only mark those areas of the disk as free, but leave the actual data on the disk surface - to later be overwritten by other files.

This means that when you delete 200 GB files inside the VM, then just some file tables are changed and from the outside there are still 200 GB of unknown data in the vmdk file.

There are some more issues later, but the really first step is to really erase the data inside the VM. For Windows there is the free sdelete tool from Microsoft. Note that the VMDK will never decrease automatically. If you are lucky then your Netapp could use the deduplication feature to transparent reclaim all zero areas.

My VMware blog: www.rickardnobel.se
0 Kudos
Lackey11
Contributor
Contributor

Thanks for the tip. I will look into the tool and to see if its save to use with VMDKs

So i assume there is no tool out there that will automatically scan the file system and pass over the information to EXSI or whatever to correct this issue right?

as this looks like an ongoing problem for all storage admins.

You mention there are more problems later one... care to share a few? Smiley Happy

Thanks you once again

0 Kudos
EdWilts
Expert
Expert

You''ve got 2 basic options...

1.  storage vMotion - this will reclaim the space

2.  Upgrade to ESXi 5.0 and a vendor-supplied VAAI plug-in.  Unfortunately NetApp hasn't provided the plug-in yet.

One thing you'll want to take note of, however, is how you look at the file sizes on the filer.  The files are created as sparse files so they look bigger than they really are.  For examplem you'd think this file is 40GB in size:

[ewilts@stp-vm-align stp1pax007]$ ls -lh stp1pax007-flat.vmdk
-rw------- 1 root root 40G Dec 23 09:40 stp1pax007-flat.vmdk

but it's actually only 33GB used:


[ewilts@stp-vm-align stp1pax007]$ ls -sh stp1pax007-flat.vmdk
33G stp1pax007-flat.vmdk

.../Ed (VCP4, VCP5)
0 Kudos
smurthy
Contributor
Contributor

Snapdrive 6.3 I think can reclaim thin provisioned space on the VM.

https://communities.netapp.com/blogs/luke/2011/09

0 Kudos
Lackey11
Contributor
Contributor

Thank you.

For the replys... I will look into it.

0 Kudos