From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZANiF-0002wp-Ho for qemu-devel@nongnu.org; Wed, 01 Jul 2015 15:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZANiB-0005eM-79 for qemu-devel@nongnu.org; Wed, 01 Jul 2015 15:30:27 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:40060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZANiB-0005du-0g for qemu-devel@nongnu.org; Wed, 01 Jul 2015 15:30:23 -0400 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Jul 2015 13:30:22 -0600 Message-ID: <55943FCE.8080204@linux.vnet.ibm.com> Date: Wed, 01 Jul 2015 14:30:22 -0500 From: "Michael R. Hines" MIME-Version: 1.0 References: <1427276174-9130-1-git-send-email-wency@cn.fujitsu.com> <559359D9.4020505@linux.vnet.ibm.com> <55936862.2070704@cn.fujitsu.com> In-Reply-To: <55936862.2070704@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH COLO v2 00/13] Block replication for continuous checkpoints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , qemu devel , Fam Zheng , Max Reitz , Paolo Bonzini Cc: Kevin Wolf , Lai Jiangshan , qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , "mrhines@us.ibm.com >> Michael R. Hines" , Stefan Hajnoczi , Yang Hongyang On 06/30/2015 11:11 PM, Wen Congyang wrote: > On 07/01/2015 11:09 AM, Michael R. Hines wrote: >> On 03/25/2015 04:36 AM, Wen Congyang wrote: >>> Block replication is a very important feature which is used for >>> continuous checkpoints(for example: COLO). >>> >>> Usage: >>> Please refer to docs/block-replication.txt >>> >>> You can get the patch here: >>> https://github.com/wencongyang/qemu-colo/commits/block-replication-v2 >>> >>> Changs Log: >>> V2: >>> 1. Redesign the secondary qemu(use image-fleecing) >>> 2. Use Error objects to return error message >>> 3. Address the comments from Max Reitz and Eric Blake >>> >>> Wen Congyang (13): >>> docs: block replication's description >>> quorum: allow ignoring child errors >>> NBD client: connect to nbd server later >>> Add new block driver interfaces to control block replication >>> quorum: implement block driver interfaces for block replication >>> NBD client: implement block driver interfaces for block replication >>> allow writing to the backing file >>> Allow creating backup jobs when opening BDS >>> block: Parse "backing_reference" option to reference existing BDS >>> Backup: clear all bitmap when doing block checkpoint >>> qcow2: support colo >>> skip nbd_target when starting block replication >>> Don't allow a disk use backing reference target >>> >>> block.c | 242 +++++++++++++++++++++++- >>> block/Makefile.objs | 2 +- >>> block/backup.c | 12 ++ >>> block/nbd.c | 171 +++++++++++++++-- >>> block/qcow2.c | 447 ++++++++++++++++++++++++++++++++++++++++++++- >>> block/qcow2.h | 6 + >>> block/quorum.c | 143 ++++++++++++++- >>> docs/block-replication.txt | 147 +++++++++++++++ >>> include/block/block.h | 5 + >>> include/block/block_int.h | 13 ++ >>> include/qemu/hbitmap.h | 8 + >>> qapi/block.json | 16 ++ >>> tests/qemu-iotests/051 | 13 ++ >>> tests/qemu-iotests/051.out | 13 ++ >>> util/hbitmap.c | 19 ++ >>> 15 files changed, 1230 insertions(+), 27 deletions(-) >>> create mode 100644 docs/block-replication.txt >>> >> When I try this patch with the MicroCheckpointing codebase, I'm having trouble starting up the secondary/backup VM >> using the branch "block-replication-v7" >> >> $ qemu-system-x86_64 -drive if=none,driver=raw,file=file.raw,id=nbd_target1 -drive if=virtio,driver=replication,mode=secondary,export=foo,file.file.filename=active_disk.qcow2,file.driver=qcow2,file.backing_reference.drive_id=nbd_target1,file.backing_reference.hidden-disk.file.filename=hidden_disk.qcow2,file.backing_reference.hidden-disk.driver=qcow2,file.backing_reference.hidden-disk.allow-write-backing-file=on >> >> Block format 'qcow2' used by device '' doesn't support the option 'backing_reference.hidden-disk.allow-write-backing-file' >> >> What am I doing wrong here? > The command is wrong. If you use the branch block-replication-v7, the command line should like: > -drive if=none,driver=raw,file=/data/images/kvm/suse/suse11_3.img,id=colo1,cache=none,aio=native -drive if=virtio,driver=replication,mode=secondary,throttling.bps-total-max=70000000,file.file.filename=/mnt/ramfs/active_disk.img,file.driver=qcow2,file.backing.file.filename=/mnt/ramfs/hidden_disk.img,file.backing.driver=qcow2,file.backing.allow-write-backing-file=on,file.backing.backing.backing_reference=colo1 > > Thanks > Wen Congyang > >> - Michael >> >> . >> Can you also tell me what's wrong with the primary/source VM command line? Or could you update the documentation please? Am I using the correct branch? Here's my command line: qemu-system-x86_64: -drive if=virtio,driver=quorum,read-pattern=fifo,no-connect=on,children.0.file.filename=/kvm_repo/image.raw,children.0.driver=raw,children.1.file.driver=nbd,children.1.file.host=192.168.168.3,children.1.file.port=6262,children.1.file.export=foo,children.1.driver=replication,children.1.mode=primary,children.1.ignore-errors=on: Failed to read export length What exactly is the purpose of the "export" parameter? Thanks, - Michael