QCOW2 think provision not working?

  • Thread starter Thread starter Deleted member 93625
  • Start date Start date
D

Deleted member 93625

Guest
Hi all,

I have configured a NFS shared storage (FreeNAS) and created two VMs with QCOW2 and VMDK disk type each. I gave 60GB as the capacity and found thin provisioning is working with VMDK but not with QCOW2. The initial file size showed 7.6MB for VMDK, but 60GB for QCOW2. I've been referring to this documentation - https://pve.proxmox.com/pve-docs/chapter-pvesm.html.

My idea was if thin provisioning works, the initial size of QCOW2 file shouldn't be 60GB, isn't this right?

I took a snapshot of QCOW2 VM and the resulted file (raw) showed reduced size around 3.1GB. So, why is the initial file size showing 60GB? Am I misunderstanding the concept of thin provisioning? Hope I can get some help. Thanks.

Eoin
 
How did you come to the impression that it uses 60 GB?
Hi,

Maybe it's not actually using 60GB but when I logged into the storage box and listed the files, it showed 60GB. On the other hand, when I use vmdk or raw formats, they showed actual used size. I expected the same behaviour with qcow2 format as well. Maybe it's not working with the same principle?

Eoin
 
Maybe it's not actually using 60GB but when I logged into the storage box and listed the files, it showed 60GB. On the other hand, when I use vmdk or raw formats, they showed actual used size. I expected the same behaviour with qcow2 format as well. Maybe it's not working with the same principle?

So, you used ls? There is also du for that. Not every file uses the same amount of space it shows you it has. There are e.g. sparse files that look huge, but apparently are not.
 
So, you used ls? There is also du for that. Not every file uses the same amount of space it shows you it has. There are e.g. sparse files that look huge, but apparently are not.
Hi,

Yes, I used ls to check the size of file. Actual usage can be different, okay, I get that. Then, my question will be, say, if I want to copy the disk to somewhere, will it copy 60GB or actual size?

Eoin
 
if I want to copy the disk to somewhere, will it copy 60GB or actual size?

That depends on how you copy it. e.g. cp can detect sparse files and be forced to create it sparse. Best to move the disks around is vzdump (ordinary PVE backup/restore).
 
ls -lsh will show the "file length" as usual and, in the first column, the size allocated on the filesystem...