Re: qcow2 corruption?

John Morrissey
2009-01-09T03:42:19Z

On Thu, Jan 08, 2009 at 02:33:28PM -0600, Anthony Liguori wrote:
> John Morrissey wrote:
> >I'm encountering what seems like disk corruption when using qcow2 images,
> >created with 'kvm-img create -f qcow2 image.qcow2 15G'.
> >
> >A simple test case is to use the Debian installer (I'm using the lenny
> >rc1 images from http://www.debian.org/devel/debian-installer/) to install
> >a new domain. The qcow2 file on disk grows due to the mkfs(8) activity,
> >then the installer faults while trying to mount the root filesystem
> >(Invalid argument). 'fdisk -l' shows that the partition table just
> >created by the installer is gone.
>
> There are patches that touch the block layer. Please try to reproduce
> on vanilla kvm. I don't trust the debian patches.

Couldn't reproduce this with Debian packaging minus its patch for
CVE-2008-0928 (taken from Fedora FWIW), which is the only one touching the
block layer.

Upon further scrutiny, I realized I pooched updating the patch for KVM 82.
The value for the BDRV_O_AUTOGROW constant introduced in that patch collides
with a new BDRV_ constant introduced between KVM 79 and 82. Changing the
constant's value (Fedora project has an updated patch, too) fixes this.

Ryan, this seems to fix the SCSI BUGging, too. I figure you won't want to
pursue that further?

Sorry for the bother, guys.