rhubear25
Contributor
Contributor

Need clarity on how Thin HD Provisioning works (VM reporting LOW disk space)

I'm running a free/unlicensed ESXi host, v6.7.

I have a P2P Search Engine, YaCy, installed on a Ubuntu server in an ESXi VM.

The YaCy server is complaining about low (< 4GB) HD space.

On said VM, I started with 10GB HD, thin provisioned, then set it to 20GB.  ESXi shows 20GB "provisioned" but ~12GB "uncommitted" obviously bc of "thin provisioning".

My question is when does does a "thin provisioned" HD/store expand/enlarge?  Ie how does Thin Provisioning work?

Does thin provisioning enlarge when free HD space gets below x GB? 

If I do a "df -h" on the linux host, it reports back only the original size, does NOT include the "uncommitted".

How do I get linux to see the full "provisioned" space?

0 Kudos
5 Replies
a_p_
Leadership
Leadership

Thin Provisioning is a file system feature. It's comparable to using sparse files on e.g. a Linux system, where unallocated blocks are represented by NULL pointers. The allocated disk space will increase - up to the provisioned size - based on writes within the guest OS, i.e. whenever the guest writes to a previously unused block. AFAIK additional disk space is allocated in 1MB increments, which is the VMFS block size.

The guest OS is not aware of this, and will see the provisioned size. Remember that after increasing the virtual disk's size, you will also have to resize the partition(s) from within the guest OS to make use of the newly provisioned disk space.

You can see the currently allocated disk spce from the command line using e.g. the ls -lisa command, which will show the allocated/used disk space in kB in the second column.

André

 

rhubear25
Contributor
Contributor

So basically I would need to boot the VM into something like GParted to change partition size..... And next time I'm setting a VM server up, give the HD _plenty_ of space which ESXi will use up when it needs to.

0 Kudos
a_p_
Leadership
Leadership

gParted is indeed a possible option in case the guest OS doesn't support partition resizing.
If you you setup a VM with a large virtual disk size, you need to monitor space usage. Some operating systems (e.g. Windows) have "features" which optimize disk space usage. Although this may be a nice option from the guest OS point of view, it may cause an unnecessary increase in disk space usage on the datastore.

What I usually do is to create separate virtual disks instead of one disk with multiple partitions. This allows to quickly increase a disk/partition without the need to relocate data in case it's not the last partition on the disk which needs to be increased.

André

0 Kudos
rhubear25
Contributor
Contributor

I've never heard of an OS itself supporting partition resizing, I must be getting totally behind on things.

Does Ubuntu linux support resizing?  I did try to look up ubuntu parition resizing, all the suggestions were to use Gparted.

I have used Gparted before, I found an ISO & tried it on a VM which is not currently a priority, def not in production.  Gparted worked fine.

What interested me the most about your reply was using multiple virt disks inside a VM.  Does one set that up inside ESXi?  At VM install time, or anytime?

Tags (1)
0 Kudos
a_p_
Leadership
Leadership

As mentioned, some operating systems (even Windows) support resizing partitions, other don't.

>>> What interested me the most about your reply was using multiple virt disks inside a VM. Does one set that up inside ESXi?
Yes, the virtual hardware is configured on the Hypervisor, i.e. in the VM's settings.

André

0 Kudos