qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qcow2 corrupted image, no error from qemu-img check


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] qcow2 corrupted image, no error from qemu-img check
Date: Mon, 3 Oct 2011 08:51:47 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Sep 30, 2011 at 09:21:29PM +0200, nicolas prochazka wrote:
> qemu-img from qemu 0.15
> 
> DEV-10.98.98.1:~# qemu-img info /mnt/disks/export/images/vm_import
> image: /mnt/disks/export/images/vm_import
> file format: qcow2
> virtual size: 20G (21474836480 bytes)
> disk size: 12G
> cluster_size: 65536
> 
> 
> DEV-10.98.98.1:~# qemu-img check
> /mnt/disks/export/images/vm_import_1317298935151
> No errors were found on the image.
> 
> DEV-10.98.98.1:~# qemu-img convert -O qcow2
> /mnt/disks/export/images/vm_import  /mnt/disks/export-ns/TEST.qcow2
> qemu-img: error while reading sector 5406720: Input/output error

You can check whether this error is reproducible using qemu-io(1):

~/qemu$ ./qemu-io -c "read -v $((5406720 * 512)) 65536" 
/mnt/disks/export/images/vm_import

This command should hexdump the cluster at 5406720 sectors.  If this
fails in the same way it will be easier to debug this command than
running a full qemu-img convert each time and waiting for it to fail.

Another useful bit of information:

~/qemu$ ./qemu-io -c "map" /mnt/disks/export/images/vm_import

This prints out the guest -> image file cluster mapping and can be
useful in understanding if/how the file is corrupted.

Also, have you tried copying the qcow2 file just using cp(1)?  It's
worth checking that cp(1) succeeds and there isn't a real I/O Error
(typically you would also see errors in dmesg).

Stefan



reply via email to

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