]> VMWare ESXi NFS thin clone 🌐:aligrant.com

VMWare ESXi NFS thin clone

Alastair Grant | Sat 1 Feb 2014

I have just got a little confused - I ran a thin clone of a *.vmdk file on an ESXi host to a NFS share:

vmkfstools -d thin mysource.vmdk /vmfs/volumes/nas/backup.vmdk

When I checked the NAS the file appeared to be thick as it took up all the space.

A bit more digging showed that whilst the file was being reported as the full provisioned size - when using the "du" command the actual space was that of the thin on ESXi.

Now I was aware you had to do that when running on the command line on ESXi - but not on the remote backup share. It turns out that my version of Linux and filesystem (btrfs) has native support for sparse files so reports their full size to "ls" but correctly doesn't use up the space on the device.

I'm not entirely sure if this is useful as most things related to disk space rely on the reported size and not actual block usage. For the purposes of backups, I'd prefer the compacted file.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.

Related