Received: from eggs.gnu.org ([208.118.235.92]:35445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUeTh-0002qG-G0 for qemu-devel@nongnu.org; Wed, 16 May 2012 09:41:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUeTW-0005Q4-C1 for qemu-devel@nongnu.org; Wed, 16 May 2012 09:41:21 -0400 Received: from indium.canonical.com ([91.189.90.7]:57021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUeTW-0005Ph-3G for qemu-devel@nongnu.org; Wed, 16 May 2012 09:41:10 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SUeTU-0005hT-Bs for ; Wed, 16 May 2012 13:41:08 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 5008C2E8079 for ; Wed, 16 May 2012 13:41:08 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 16 May 2012 13:31:51 -0000 From: "Sebastian J. Bronner" Sender: bounces@canonical.com References: <20110315125646.4341.22743.malonedeb@potassium.ubuntu.com> Message-Id: <20120516133151.27975.37231.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 735454] Re: live kvm migration with non-shared storage corrupts file system Reply-To: Bug 735454 <735454@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Now that Ubuntu 12.04 LTS is out, I retested. All my tests ran OK. As long as the local I/O was too high for the migration transfer speed, the migration wouldn't complete. When reduced far enough, migration completed successfully. The I/O on both nodes looked as one would expect now, and fsck didn't find any errors. I therefore presume that all data was written to the destination node correctly. ** Changed in: qemu Status: New =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/735454 Title: live kvm migration with non-shared storage corrupts file system Status in QEMU: Fix Released Bug description: Description of problem: Migrating a kvm guest on non-shared lvm-storage using block migration (-b flag) results in a corrupted file system if that guest is under considerable I/O load. Version-Release number of selected component (if applicable): qemu-kvm-0.12.3 linux-kernel-2.6.32 lvm2-2.02.54 How reproducible: The error can be reproduced consistently. Steps to Reproduce: 1. create a guest using lvm-based storage 2. create an LV on the destination node for the guest to be migrated to 3. place the attached scripts somewhere on the guest's system 4. run 'runlots' 5. migrate the guest using the -b flag 6. if the migration doesn't complete in an appropriate amount of time (45 minutes for our 100GB image), it will be necessary to stop the test scripts: type 'killall python' 7. attempt to shut down the guest, forcing it off if necessary 8. access the partitions of the LV on the node: 'partprobe /dev/mapper /' 9. run fsck: 'fsck -n -f /dev/mapper/p1' Actual results: You should see a big mess of errors, that go beyond what can be accounted for by an unclean shutdown. Expected results: Expected is a clean bill of health from fsck. Additional information: I suspect that there is some sort of race condition in the live synchronization algorithm for dirty blocks used for block migration. Workaround: The only safe way to migrate guests in this scenario is by suspending them just prior to the migration. That way they are first suspended, then everything is transferred, and finally resumed on the target node. When the I/O load is low, the migration works live, as well. However, this is too risky to use on production systems because there is no way to tell when the I/O load is too high for a successful live migration. Using this workaround is very dissatisfying because for a guest with a 100GB filesystem, the migration takes 45 minutes on our systems, meaning that we have a downtime of 45 minutes. Having migrated other guests with 0 downtime got us hooked. The attached scripts to simulate high I/O load are somewhat artificial in= nature. However, the bug is motivated by a real-world scenario: We migrate= d a productive mail-server that subsequently became buggy, finally crashed = and corrupted several of our customers' e-mails. Unfortunately a bug of thi= s nature can't be tested on non-productive systems, because they don't reac= h the necessary load levels. The scripts reliably reproduce the failure experie= nced by our mail-server. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/735454/+subscriptions