nfs based VM storage grows more than its size

Karistea

New Member
Jan 20, 2021
7
0
1
Hi,

I have a VM with its storage located on an nfs server and I recently noticed that its size grew to 102Gb instead of 76Gb which was the initially allocated space. The image format is qcow2:

-rw-r----- 1 root root 102G Jan 20 5:08 /mnt/pve/nfs/images/132/vm-132-disk-0.qcow2

I currently have no snapshots for this VM ( I had one in the past).

Is this behavior expected? How can I prevent this in the feature?

thank you
 
hi,

qcow2 disks are thin provisioned, so they can grow in size dynamically.

if you want to use a preallocated disk with a static size, you can maybe use different a disk format

please check here [0] for more details

[0]: https://pve.proxmox.com/wiki/Storage
 
hi,

qcow2 disks are thin provisioned, so they can grow in size dynamically.

if you want to use a preallocated disk with a static size, you can maybe use different a disk format

please check here [0] for more details

[0]: https://pve.proxmox.com/wiki/Storage

I understand how thin provisioning works but I still cannot get why my OS disk is 76Gb while the qcow2 is 102G:

fdisk -l /dev/sda
Disk /dev/sda: 76 GiB, 81604378624 bytes, 159383552 sectors
 
could you paste the output of qemu-img info /mnt/pve/nfs/images/132/vm-132-disk-0.qcow2
 
# qemu-img info vm-132-disk-0.qcow2
image: vm-132-disk-0.qcow2
file format: qcow2
virtual size: 76 GiB (81604378624 bytes)
disk size: 101 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false