qcow2 file size on NFS shared storage

DynFi User

Renowned Member
Apr 18, 2016
152
17
83
49
dynfi.com
Hello,

I am trying to figure out how things are working when related to disk size and disk image and real disk size.

I have an NFS shared storage with 10T of disk space.
This storage is a FreeNAS ZFS storage and is available on all nodes of my cluster (shared using NFS).

The size of the qcow2 disk on my NFS server is the following :


[root@jaws] /mnt/data/home/gregober# ls -alh /mnt/data/kvm/images/127/
total 4174686
drwxr----- 2 root wheel 3B Sep 15 16:46 ./
drwxr-xr-x 7 root wheel 7B Sep 15 16:46 ../
-rw-r--r-- 1 root wheel 9.8G Sep 15 17:27 vm-127-disk-1.qcow2


When I am inside the server I have a totally different picture :


gregober@fred:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 478M 0 478M 0% /dev
tmpfs 100M 5.8M 94M 6% /run
/dev/vda1 62G 23G 37G 39% /
tmpfs 497M 4.0K 497M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 497M 0 497M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user/1002
tmpfs 100M 0 100M 0% /run/user/1001




So my simple question is : where are the missing bits ??

I wrote two files of 10G each inside the KVM container and the size of the qcow2 image didn't move at all.


I have resized in Proxmox GUI the file size of the KVM image and put it 60G more… Still no change in the qcow2 file…


I am really perplex about all this : the size of my data inside the KVM is bigger than the reported file size of my qcow2 disk ?!


Could someone light my candle ?
 
dd if=/dev/zero of=10G2 bs=1M count=10000

Yes zeroes !
 
So all in all I should be safe with my Qcow2 being 10G and my KVM thinking It is 67G ?

I am testing It with /dev/urandom

Will also read the pointer !
 
I have written a 12G file using dd and /dev/urandom and the size of my qcow2 image hasn't move a bit ?!

I am really perplex :

  1. where are the data stored ?
  2. what if my data get bigger than my storage ?
  3. How can a virtualized file system be bigger than the image which is supposed to contain the data ?

I am asking all this because we are about to deploy critical servers using this method and, I need to avoid any problem with this deployment.
 
No, It is not possible that I am checking the wrong file.
 
could you post the output of "qemu-img info /mnt/data/kvm/images/127/vm-127-disk-1.qcow2" and "qm config 127"? I am pretty sure that we are missing something along the way..
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!