[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it normal to get bigger qcow2 image after blockcopy?
From: |
Alberto Garcia |
Subject: |
Re: Is it normal to get bigger qcow2 image after blockcopy? |
Date: |
Tue, 7 Nov 2023 10:11:05 +0000 |
On Tue, Nov 07, 2023 at 05:32:22PM +0800, Han Han wrote:
> >>> Before blockcopy, check source image:🔄 ❓
> >>>
> >> # qemu-img info -U
> >>> /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2🔄 ❓
> >>>
> >>
> > Was this a compressed qcow2 image when you started? maybe you started with
> > an appliance image?
> >
> Hi, Nir, I have a question here: How to check if a qcow2 image is
> compressed?
$ qemu-img map /path/to/image.qcow2
If it says "File contains external, encrypted or compressed clusters"
and the image is not encrypted then that's probably it.
> The qcow2 file /var/lib/avocado/data/avocado-vt/images/copy.qcow2 is
> created without compress options, while the qemu-img info for it
> shows `compression type: zlib`. Is that mean the image is compressed
> as well?
No, in qcow2 there is actually no such thing as a compressed image as
opposed to an uncompressed image.
qcow2 images contain a collection of data clusters, and each
individual cluster can be either compressed or uncompressed.
That zlib that qemu-img reports is the algorithm that is used for
compressed clusters *IF* they exist, but it's perfectly possible that
an image does not have any compressed cluster.
Berto