This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] HVM guest disk corruption after shutdown

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] HVM guest disk corruption after shutdown
From: "Huang2, Wei" <Wei.Huang2@xxxxxxx>
Date: Wed, 6 Jul 2011 16:22:30 -0500
Accept-language: en-US
Acceptlanguage: en-US
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "JBeulich@xxxxxxxxxx" <JBeulich@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Wed, 06 Jul 2011 14:27:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acw8ItALGok4KbsjQ/iWyDCJYOI46A==
Thread-topic: HVM guest disk corruption after shutdown

We recently found a disk corruption issue with SLES11 SP1 guest. Basically the guest disk becomes non-bootable after guest shutdown. This is a SLES specific issue as we didn’t see on other Linux and Windows VMs. Here is the configuration:


1.      Xen: xen-4.1-testing, changeset 23096

2.      Dom0: Jeremy’s latest pvops 6d94b75 (June 1)

3.      VM: SLES 11 SP1, installed as physical machine with raw disk format



Regarding the disk before corruption, “file sles11sp1.img” command read: “/root/guests/sles11-sp1/sles11sp1.img: x86 boot sector; partition 1: ID=0x82, starthead 1, startsector 63, 4208967 sectors; partition 2: ID=0x83, active, starthead 0, startsector 4209030, 16755795 sectors”. After corruption, it became a data file: ““/root/guests/sles11-sp1/sles11sp1.img: data”.


I traced back to the blkback commit 28080265 by Konrad. If I disabled this change, the corruption issue will disappear.



diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c

index fd88f32..30772ec 100644

--- a/drivers/xen/blkback/blkback.c

+++ b/drivers/xen/blkback/blkback.c

@@ -409,8 +409,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,



                operation = WRITE_BARRIER;

-               /* vbd_translate is alergic to bizzare sectors. */

-               req->sector_number = 0;



                operation = 0; /* make gcc happy */







Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>