Re: qcow2 corruption?

Ryan Harper
2009-01-08T20:10:52Z

* John Morrissey <jwm@horde.net> [2009-01-08 13:28]:
> I'm encountering what seems like disk corruption when using qcow2 images,
> created with 'kvm-img create -f qcow2 image.qcow2 15G'.
>

using ide or scsi as your block device?

> 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.
>
> In a few cases, I've managed to finish an installation, but the resulting
> filesystem is strangely corrupt:
>
> # file /usr/bin/w.procps
> /usr/bin/w.procps: gzip compressed data, was "aptitude.8", from Unix, last modified: Wed Mar 14 14:11:18 2007, max compression

If you are using ide and getting corruption, try again but with creating
a disk image with the raw format:

qemu-img create -f raw <imagename> <size>

That should help track down where the corruption is coming from.

--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com