0

I have a linux vm with 40GB Thick provision Eager Zeroed. when I login to my ESXI Server I can see that the folder of the VM is about 40GB. I've created a 10GB file on the linux VM machine. I see that the VM folder on the ESXi grew in 10 GB. I decided to delete the file on the Linux machine and thought the VM folder on the ESXI will shrink as well but it stayed the same as it was after I added the 10GB file.

is it because I'm using Thick provisioning or this is the way VMware VM works? why didn't the VM folder on the ESXi shrink back to the default size once I deleted the 10GB file?

Thanks! Dotan.

edotan
  • 1,786
  • 12
  • 37
  • 57

1 Answers1

4

Thick provision (lazy or eager) never fluctates in size, so I have no idea how you managed to get the folder to grow with a thick disk. You must be running a thin disk.

Storage does not get reclaimed with thick disks - your only option with thick disks is to use a thin-provisioned SAN, and then issue a VAAI UNMAP once you delete files from the datastore. See http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2048466

With thin provisioned disks in vmware you have to do it the following way to reclaim space:

  1. Use a tool on the guest to zero out unused blocks, like sdelete for Windows
  2. Storage migrate the VM to a different datastore as a thin provisioned disk. This will not carry over zero'ed blocks.
pauska
  • 19,532
  • 4
  • 55
  • 75
  • I'm sure it's thick. I'm looking at the VM Configuratoin. before creating the 10GB I had 44.1G now it's 54.4G. – edotan Aug 01 '13 at 09:15
  • btw, if I have 100GB thin provision disk and it's only has 1GB of data. this is what I should see in the VM folder. right? now let's say I add 20 GB of Data. it should grow to to 21GB. correct? now I delete the 20 GB. the VM folder is still 21GB. now I add a 90GB data. the VM folder will show 111GB while the VM only have 901GB? – edotan Aug 01 '13 at 09:19
  • If you have a 100GB thin disk, and write 20GB of data in to it, it shows as a 20GB file in the datastore browser. If you delete 5GB from it, it still shows as a 20GB file. If you add 30GB to it, it will show up as a 50GB file. It does not shrink, ever. – pauska Aug 01 '13 at 09:38
  • can I reclaim free space on a thin provision? Thanks! – edotan Aug 01 '13 at 09:48
  • I wrote how you can reclaim it in my answer.. – pauska Aug 01 '13 at 11:19
  • I use ESXI 5 (free edition) I don't have the migrate option. I can't use "sdelete" because my system is Linux. Thanks! – edotan Aug 01 '13 at 12:51
  • Then try to use google and find an alternative tool for Linux. Look at the last post here for an alternative way of doing svmotion: http://communities.vmware.com/thread/396197?start=0&tstart=0 – pauska Aug 01 '13 at 13:25