Hello all,
I have a few questions regarding qcow2 images sizes because right now I am really confuzed... Let me describe a bit about a situation I deal with.
I have 1.4 TB array with contains just one single VM with 3 separated qcow2 images:
# ls -lah
-rw-r----- 1 root root 17G jun 14 10:44 vm-100-disk-0.qcow2
-rw-r----- 1 root root 1,4T jun 14 10:44 vm-100-disk-2.qcow2
-rw-r----- 1 root root 199G jun 14 10:44 vm-100-disk-3.qcow2
All looks fine, but the actuall size of the storage on that host is 1.4 TB, so how the hell I can have almost 1.6 TB?
You might say "there is a difference between actual size of image and the reserved size" - OK, I agree, but - how to explain info below?
qemu-img info vm-100-disk-0.qcow2
image: vm-100-disk-0.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 10 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
qemu-img info vm-100-disk-2.qcow2
image: vm-100-disk-2.qcow2
file format: qcow2
virtual size: 1.17 TiB (1288490188800 bytes)
disk size: 1.15 TiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
qemu-img info vm-100-disk-3.qcow2
image: vm-100-disk-3.qcow2
file format: qcow2
virtual size: 185 GiB (198642237440 bytes)
disk size: 184 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Those sizes (disk or virtual) are really different than values displayed by ls command. Partitions created on those images are pretty much the same as the virtual sizes, so they cant be oversized. How is it possible they weight more?
Whats more - when I moved the 3rd image (185 GB, actually used 133GB, but ls shows it as 200GB) to different server I gained 167 GB of space on that storage. I was a bit worry when I tried to move it back - but it actually moved without problem. What kind of math calculated actually 167 GB?
And last thing - proxmox storage info in GUI shows 96,7% storage usage... Even if df command shows 100% usage and 0 free space.
So my questions are:
Best regards!
I have a few questions regarding qcow2 images sizes because right now I am really confuzed... Let me describe a bit about a situation I deal with.
I have 1.4 TB array with contains just one single VM with 3 separated qcow2 images:
# ls -lah
-rw-r----- 1 root root 17G jun 14 10:44 vm-100-disk-0.qcow2
-rw-r----- 1 root root 1,4T jun 14 10:44 vm-100-disk-2.qcow2
-rw-r----- 1 root root 199G jun 14 10:44 vm-100-disk-3.qcow2
All looks fine, but the actuall size of the storage on that host is 1.4 TB, so how the hell I can have almost 1.6 TB?
You might say "there is a difference between actual size of image and the reserved size" - OK, I agree, but - how to explain info below?
qemu-img info vm-100-disk-0.qcow2
image: vm-100-disk-0.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 10 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
qemu-img info vm-100-disk-2.qcow2
image: vm-100-disk-2.qcow2
file format: qcow2
virtual size: 1.17 TiB (1288490188800 bytes)
disk size: 1.15 TiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
qemu-img info vm-100-disk-3.qcow2
image: vm-100-disk-3.qcow2
file format: qcow2
virtual size: 185 GiB (198642237440 bytes)
disk size: 184 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Those sizes (disk or virtual) are really different than values displayed by ls command. Partitions created on those images are pretty much the same as the virtual sizes, so they cant be oversized. How is it possible they weight more?
Whats more - when I moved the 3rd image (185 GB, actually used 133GB, but ls shows it as 200GB) to different server I gained 167 GB of space on that storage. I was a bit worry when I tried to move it back - but it actually moved without problem. What kind of math calculated actually 167 GB?
And last thing - proxmox storage info in GUI shows 96,7% storage usage... Even if df command shows 100% usage and 0 free space.
So my questions are:
- How to determine the real size of the images
- The moment sum of sizes of images are 200GB over actually storage size - storage has 0 free space. The sum of partitions sizes on images are about 1.35 TB (about 80% filled) - do I need to worry about lack of free space.. somewhere? somehow?
- How to shring the image so it fit the size it actually has reserved?
Best regards!