[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: qemu-img measure
From: |
Stefan Hajnoczi |
Subject: |
Re: qemu-img measure |
Date: |
Fri, 24 Jul 2020 15:00:10 +0100 |
On Thu, Jul 23, 2020 at 07:31:13PM +0300, Nir Soffer wrote:
> On Thu, Jul 23, 2020 at 6:12 PM Arik Hadas <ahadas@redhat.com> wrote:
> > [root@lion01 8c98c94d-bc14-4e24-b89c-4d96c820056d]# qemu-img measure -O
> > qcow2 /tmp/arik.qcow2
> > required size: 9359720448
> > fully allocated size: 16108814336
>
> Now we have qcow2 image, so we don't depend on the file system capabilities.
> This is the advantage of using advanced file format.
>
> > shouldn't the 'measure' command be a bit smarter than that? :)
>
> I think it cannot be smarter, but maybe qemu folks have a better answer.
qemu-img measure checks that allocation status of blocks. As Nir said,
if the file system (older NFS versions) doesn't support that then it
doesn't know about zero blocks.
It would be possible to add a slow loop that reads the entire input
image but I'm not sure how useful it would be to read many gigabytes of
data from the disk. The process would be slow and degrade performance of
VMs by consuming I/O bandwidth.
Stefan
signature.asc
Description: PGP signature