qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific inf


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info
Date: Thu, 18 May 2017 13:38:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 05/18/2017 01:25 PM, Kevin Wolf wrote:
> Am 18.05.2017 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> Shows, how much data qcow2 allocates in underlying file. This should
>> be helpful on non-sparse file systems, when qemu-img info "disk size"
>> doesn't provide this information.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>> ---
>> Hi all.
>>
>> Here is an allocated-size feature for qemu-img info.
> I'm not a fan of loading all L2 tables (can take some time) for
> 'qemu-img info' (which should be very quick). Why isn't the qemu-img
> check output good enough?
>
> Kevin
>
> $ ./qemu-img check /tmp/test.qcow2 
> No errors were found on the image.
> 16164/491520 = 3.29% allocated, 11.98% fragmented, 0.00% compressed clusters
> Image end offset: 1060044800
> $ ./qemu-img check --output=json /tmp/test.qcow2 
> {
>     "image-end-offset": 1060044800,
>     "total-clusters": 491520,
>     "check-errors": 0,
>     "allocated-clusters": 16164,
>     "filename": "/tmp/test.qcow2",
>     "format": "qcow2",
>     "fragmented-clusters": 1937
> }
this can be done, sure. Is this considered safe
for running VM too?

Den



reply via email to

[Prev in Thread] Current Thread [Next in Thread]