qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replicat


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints
Date: Thu, 9 Jul 2015 02:55:26 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Wen Congyang (address@hidden) wrote:
> On 07/08/2015 11:49 PM, Michael R. Hines wrote:
> > On 07/07/2015 08:38 PM, Wen Congyang wrote:
> >> On 07/08/2015 12:56 AM, Michael R. Hines wrote:
> >>> On 07/07/2015 04:23 AM, Paolo Bonzini wrote:
> >>>> On 07/07/2015 11:13, Dr. David Alan Gilbert wrote:
> >>>>>>> This log is very stange. The NBD client connects to NBD server, and 
> >>>>>>> NBD server wants to read data
> >>>>>>> from NBD client, but reading fails. It seems that the connection is 
> >>>>>>> closed unexpectedly. Can you
> >>>>>>> give me more log and how do you use it?
> >>>>> That was the same failure I was getting.   I think it's that the NBD 
> >>>>> server and client are in different
> >>>>> modes, with one of them expecting the export.
> >>>> nbd_server_add always expects the export.
> >>>>
> >>>> Paolo
> >>>>
> >>> OK, Wen, so your wiki finally does reflect this, but now we're back to 
> >>> the "export not found error".
> >>>
> >>> Again, here's the exact command line:
> >>>
> >>> 1. First on the secondary VM:
> >>>
> >>> qemu-system-x86_64 .........snip...........  -drive 
> >>> if=none,driver=qcow2,file=foo.qcow2,id=mc1,cache=none,aio=native -drive 
> >>> if=virtio,driver=replication,mode=secondary,throttling.bps-total-max=70000000,file.file.filename=active_disk.qcow2,file.driver=qcow2,file.backing.file.filename=hidden_disk.qcow2,file.backing.driver=qcow2,file.backing.allow-write-backing-file=on,file.backing.backing.backing_reference=mc1
> >>>
> >>> 2. Then, then HMP commands:
> >>>
> >>> nbd_server_start 0:6262
> >>> nbd_server_add -w mc1
> >>>
> >>> 3. Then the primary VM:
> >>>
> >>> qemu-system-x86_64 .........snip...........  -drive 
> >>> if=virtio,driver=quorum,read-pattern=fifo,no-connect=on,children.0.file.filename=bar.qcow2,children.0.driver=qcow2,children.1.file.driver=nbd,children.1.file.host=127.0.0.1,children.1.file.port=6262,children.1.driver=replication,children.1.mode=primary,children.1.ignore-errors=on
> >>>
> >>> With the error: Server requires an export name
> >>>
> >>> *but*, your wiki has no export name on the primary VM size, so I added 
> >>> the export name back which is on your old wiki:
> >>>
> >>> qemu-system-x86_64 .........snip...........  -drive 
> >>> if=virtio,driver=quorum,read-pattern=fifo,no-connect=on,children.0.file.filename=bar.qcow2,children.0.driver=qcow2,children.1.file.driver=nbd,children.1.file.export=mc1,children.1.file.host=127.0.0.1,children.1.file.port=6262,children.1.driver=replication,children.1.mode=primary,children.1.ignore-errors=on:
> >>>  Failed to read export length
> >>>
> >> Hmm, I think you use v7 version. Is it right?
> >> In this version, the correct useage for primary qemu is:
> >> 1. qemu-system-x86_64 .........snip...........  -drive 
> >> if=virtio,driver=quorum,read-pattern=fifo,id=disk1,
> >>                        
> >> children.0.file.filename=bar.qcow2,children.0.driver=qcow2,
> >>
> >> Then run hmp monitor command(It should be run after you run nbd_server_add 
> >> in the secondary qemu):
> >> child_add disk1 
> >> child.driver=replication,child.mode=primary,child.file.host=127.0.0.1,child.file.port=6262,child.file.export=mc1,child.file.driver=nbd,child.ignore-errors=on
> >>
> >> Thanks
> >> Wen Congyang
> >>
> >>> And server now says:
> >>>
> >>> nbd.c:nbd_handle_export_name():L416: export not found
> >>> nbd.c:nbd_send_negotiate():L562: option negotiation failed
> >>>
> >>> .
> >>>
> >>
> > 
> > OK, I'm totally confused at this point. =)
> > 
> > Maybe it would be easier to just wait for your next clean patchset + 
> > documentation which is all consistent with each other.
> 
> I have sent the v8. But the usage is not changed. You can setup the 
> environment according to the wiki.
> When we open nbd client, we need to connect to the nbd server. So I introduce 
> a new command child_add to add NBD client
> as a quorum child when the nbd server is ready.
> 
> The nbd server is ready after you run the following command:
> nbd_server_start 0:6262 # the secondary qemu will listen to host:port
> nbd_server_add -w mc1   # the NBD server will know this disk is used as NBD 
> server. The export name is its id wc1.
>                         # -w means we allow to write to this disk.
> 
> Then you can run the following command in the primary qemu:
> child_add disk1 
> child.driver=replication,child.mode=primary,child.file.host=127.0.0.1,child.file.port=6262,child.file.export=mc1,child.file.driver=nbd,child.ignore-errors=on
> 
> After this monitor command, nbd client has connected to the nbd server.

Ah! The 'child.file.export=mc1' wasn't there previously; I see Yang added that 
to the wiki yesterday;
that probably explains the problem that we've been having.

Dave

> 
> Thanks
> Wen Congyang
> 
> > 
> > - Michael
> > 
> > .
> > 
> 
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]