VMware Cloud Community
m4biz
Hot Shot
Hot Shot
Jump to solution

Save space on thin provision disk

Hi.

I've a VM that has N. 3 thin provisioned disks:

  • the 1st-> with provisioned size of 20 GB
  • the 2nd-> with provisioned size of 3 GB
  • the 3rd-> with provisioned size of 20 GB

If I look on Storage Usage on the ESXi 5 server (from within VI Client) I can see this:

Provisioned.png

But If I login on the VM, I see this:

VM.png

With a simple calculation, I can see that the storage size really used on the VM is only (20 - 8,64) + (3 - 0,746) + (20 - 5,46) = 28,15 GB .

Very different from Used Storage of 40,48 GB,

The question is:

is there any way to recover unused storage space?

In other words: is there any way to align the "Used Storage" showed on the Resources of  the ESXi server to that really used from the VM?

Thanks in advance.

Ing. Cosimo Mercuro http://cosimomercuro.wordpress.com/
0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

You can use vmkfstools with the --punchzero option to reclaim disk space from thin provisioned virtual disks. For this to work, you first need to zero out unused disk space within the guest OS itself, then power off the VM and run the vmkfstools command.

André

View solution in original post

0 Kudos
4 Replies
abhilashhb
VMware Employee
VMware Employee
Jump to solution

Do you have any snapshots of the VM? Because the used storage will include the snapshot files too.

Also the Swap file. Whats the RAM assigned to the VM?

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

0 Kudos
m4biz
Hot Shot
Hot Shot
Jump to solution

Hi abhilashhb

Thanks for your reply.

Actually there aren't snapshot, but in the past yes (and I've deleted its😞

snap.png

The VM, use 2 GB RAM.

Any other idea?

Ing. Cosimo Mercuro http://cosimomercuro.wordpress.com/
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

You can use vmkfstools with the --punchzero option to reclaim disk space from thin provisioned virtual disks. For this to work, you first need to zero out unused disk space within the guest OS itself, then power off the VM and run the vmkfstools command.

André

0 Kudos
m4biz
Hot Shot
Hot Shot
Jump to solution

Hi André.

Many thanks.

It works right!

Ing. Cosimo Mercuro http://cosimomercuro.wordpress.com/
0 Kudos