VMware Cloud Community
ujjain
Contributor
Contributor

Reclaiming free space from thin disks in ESXi for Linux and Windows guests?

I have stored back-ups on a D:\ disk in Windows and removed 150GB worth of back-ups and would like to be able to reclaim this space. The same is true for other, mainly Linux, virtual machines. I have regularly cleaned up systems and been able to decrease disk usage from 40 GB to 15 GB.

It even seems that backup solutions that use VMWare snapshots are actually slower backing up a bigger disk, than a smaller, even though in Linux the disk usage is only 15GB.

I see many people have simply gives up and some people used different software, but after having googled a lot about this subject I am still not sure what I should do to reclaim free disk space for Windows, CentOS and Debian guests.

0 Kudos
2 Replies
DSTAVERT
Immortal
Immortal

The simplest method is to use VMware Standalone Converter to convert just those disks and then delete the original.

-- David -- VMware Communities Moderator
0 Kudos
J1mbo
Virtuoso
Virtuoso

In order to recover space on thin-provisioned disks, after recovering the space in the guest (by deleting files) then the now free space needs to be zero'd out by using, for example on Linux, dd if=/dev/zero of=testfile bs=1m, and then delete the testfile straight away after of course, and finally storage vMotion (or cold migrate) the guest between datastores.

The problem is that this will create a massive subsequent backup job if using change-block-tracking (i.e. Veeam) as it will touch many blocks.  For a straight snapshot-then-copy-base-vmdk approach, it will help if the target is an NFS datastore though.  If the target is a de-dupe'd store then there's little point anyway.

If you're backing up to a Windows provided NFS share then another option is to enable NTFS compression on the backup folder, and in this case too cleaning disks with writing out zeros will help as zero'd blocks take up no space in this way too.

Hope that helps.

0 Kudos