VMware Cloud Community
kchubb
Contributor
Contributor

Datastore space after snapshot

I have a datastore that's holding a single Windows Server 2016 VM.

On 10/27 PM the datastore used space was 1,451 GB when I took a VM snapshot and then downloaded/installed Windows Updates. On 10/28 AM I deleted the snapshot and then the datastore used space increased to 1,727 GB. That's an increase of 276 GB but used space as reported by Windows hardly went up at all.

What would explain a rise in datastore usage like this?

*I added the performance graph as an attachment since it's not allowing me to upload the image to this post.

0 Kudos
4 Replies
kchubb
Contributor
Contributor

I just browsed the datastore and noticed that the sizes of the VMDK files are the same as the allocated size. These disks are thin provisioned though. They are not full because Windows shows them as having a total of 273 GB free.

0 Kudos
a_p_
Leadership
Leadership

ESXi allocates new blocks on the datastore on demand by the guest OS, i.e. if the guest OS writes to blocks/sectors on the virtual disk which have not been use before, the .vmdk file will be expanded. However, if the guest OS deletes data, ESXi is not aware of this, and therefore will not shrink the .vmdk file.

In case it's necessary, free (zeroed out) disk space can be reclaimed by manually running vmkfstools –punchzero thin-diskmane.vmdk which requires that the VM is powered off.

André

0 Kudos
kchubb
Contributor
Contributor

I have another application that monitors disk usage inside Windows and it does not show 270+ GB of data ever being written to or deleted from this server. Furthermore there are two disks, 80 GB and 1,600 GB allocated, which are thin provisioned but the VMDKs are now 80 GB and 1,600 GB, so full size. Whatever happened caused this on both disks, so I don't believe that it's a matter of data being written and then deleted but never reclaimed.

The VMDKs grew to full size after deleting the snapshot so I feel like it has to be related to that.

0 Kudos
kchubb
Contributor
Contributor

Oh and these are VMFS 6 datastores so I believe that space reclamation happens automatically, no?

0 Kudos