[PVE-User] Creating VM with thin provisioning (please help me understand it).

Gianni Milo gianni.milo22 at gmail.com
Thu Mar 5 22:32:51 CET 2020


>
So ... Lets suppose I created 5 VMs about 200Gb each on a 1TB space.
> Im using less than 50% on each VM and now I need  to add a 6th VM ?  Even
> Im using thin storage , I will have no free space.
> What can I do ?


When using ThinLVM a VM initially allocates the same amount of data as the
guest OS. For example, if you install plain Windows10 in a VM, initially it
will occupy only 20GB of disk space, despite the fact that its virtual disk
is 200GB. Of course, as the demand for data within guest OS grows, that
initial 20GB will eventually become 30,50,100 until it maxes out the 200GB
limit. Once it reaches the 200GB limit, that virtual disk effectively
becomes a ThickLVM volume. This is one of the reasons why you should make
sure to constantly monitor the disk space consumption when using ThinLVM,
especially if you are over provisioning (i.e Using 6 VM x 200GB each = 1.2
TB, where the actual physical space is only 1TB). Failing to do so, could
lead in irreversible data corruption. Use the normal LVM cli commands to
monitor its status, space utilisation etc (lsblk is not the right tool for
that).

I suggest you reading the Proxmox Admin guide so you familiarise yourself
with its concepts. In particular chapter 7, where its storage model is
described...

https://pve.proxmox.com/pve-docs/pve-admin-guide.pdf

One last thing, normally the guest OS won't release the occupied disk space
on the host when you delete data within it. For example, let's say that you
have a VM which is using 30GB of data and then you delete 10GB worth of
data. That 10GB of space won't be released from the VM ThinLV volume,
unless you use virtio-scsi as storage controller for the VM and the discard
option is enabled.

More on LVM:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/index


G.



More information about the pve-user mailing list