qcow2 image grown larger than allocated size

Erk

Renowned Member
Dec 11, 2009
165
6
83
I have two vms with drives in qcow2 format that were created to be 80GB each. Over time they crept up in size. The server is on the current 3.4 but the drives were made years ago on an earlier version, maybe even 3.0 vintage.

One is now 104GB, the other 159GB is this normal behavior for qcow2 drives? The Centos Linux systems on the vms don't recognize the extra space, both still think it's drive is only 80GB, so I am worried that it might signify some form of fault with the qcow2 files. I never had the size of a .raw vm drive file go above the allocated space.

I know how to convert and shrink the files to reclaim the space, that's not a problem. I just want to find out if anyone knows why the files have grown beyond the max size they were created to be, and how I can prevent it happening again?
 
Did you do a lot of snapshots? That could be a possible cause of this issue.

Snapshots work with QCOW2 as in every copy on write (file) system, when snapshot-ed the old data remains, but basically hidden, so it is accessible in the future and new data get's written some where else - see https://en.wikipedia.org/wiki/Copy-on-write#Copy-on-write_in_storage_media

So preventing it is correlated with the use of snapshots. :)
 

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!