From nobody Mon Feb 9 07:55:55 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1637592413; cv=none; d=zohomail.com; s=zohoarc; b=CuZlFXN/fx+HV2vnhejMuHjpDTtH45VKYvOMiGXukKIJHyb4nOhKLSsX0Bpa7pgaaKLfOFcf2KUnYq66r1NDvvZmTmCchJ947aprkQ7Sv/LzeW79nOY9lB+TA2IkRmzKiwLz5fcgtAqPb3SG7X0Z03tJnA7qYthFtddj0f+J85g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637592413; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4YIvnVCiN6Ga3fkglEcdGF4J2I8t1zE1bdcYeQA+S/A=; b=SPGlyhfxP1Pdo3MUk0lKL3wCFXoNpZcbCTCmPETXqAuUUX8cBTB32hmxwKyl4HcM6/IYAxP9W3Y129ICVCo14JfqbN0SIHWwKWA6xvAU72B73Tde/+m7gypEvkZgt2kMT3+YavnaHAy2KZsDxSgvIMfJ94yva+QUJAE9AY6EqnM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637592413619729.2158877932162; Mon, 22 Nov 2021 06:46:53 -0800 (PST) Received: from localhost ([::1]:33352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpAap-0003v6-Er for importer@patchew.org; Mon, 22 Nov 2021 09:46:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpAY0-00089U-21 for qemu-devel@nongnu.org; Mon, 22 Nov 2021 09:43:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpAXw-0004Kd-63 for qemu-devel@nongnu.org; Mon, 22 Nov 2021 09:43:55 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-p1BVu11mPqOXUVmdKuWZCA-1; Mon, 22 Nov 2021 09:43:47 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 284B8806689; Mon, 22 Nov 2021 14:43:46 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF6235E274; Mon, 22 Nov 2021 14:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637592230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4YIvnVCiN6Ga3fkglEcdGF4J2I8t1zE1bdcYeQA+S/A=; b=bwXl48Z/5ZU088xg1EyERn80+7RV0dFaemx6aBkj2Er+jWxFsS5DZ1/a3Z9PMQ2PTwf64P yV+heQmmOoQF5yHkGU9cChNOZGeY/pJ1J6OqV24TZLIVM7DorySdUJFdp47xB4rG2rN9Ux bG5sg05JkR1iTxcauFwr2A4N2fpJa7A= X-MC-Unique: p1BVu11mPqOXUVmdKuWZCA-1 From: Thomas Huth To: Richard Henderson , qemu-devel@nongnu.org Subject: [PULL 5/6] docs: Use double quotes instead of single quotes for COLO Date: Mon, 22 Nov 2021 15:43:19 +0100 Message-Id: <20211122144320.29178-6-thuth@redhat.com> In-Reply-To: <20211122144320.29178-1-thuth@redhat.com> References: <20211122144320.29178-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.709, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rao, Lei" , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637592415342100001 Content-Type: text/plain; charset="utf-8" From: "Rao, Lei" Signed-off-by: Lei Rao Message-Id: <1637567387-28250-2-git-send-email-lei.rao@intel.com> Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth --- docs/COLO-FT.txt | 106 ++++++++++++++++++------------------- docs/block-replication.txt | 52 +++++++++--------- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index fd5ffcc6e5..8ec653f81c 100644 --- a/docs/COLO-FT.txt +++ b/docs/COLO-FT.txt @@ -209,9 +209,9 @@ children.0=3Dchilds0 \ =20 =20 3. On Secondary VM's QEMU monitor, issue command -{'execute':'qmp_capabilities'} -{'execute': 'nbd-server-start', 'arguments': {'addr': {'type': 'inet', 'da= ta': {'host': '0.0.0.0', 'port': '9999'} } } } -{'execute': 'nbd-server-add', 'arguments': {'device': 'parent0', 'writable= ': true } } +{"execute":"qmp_capabilities"} +{"execute": "nbd-server-start", "arguments": {"addr": {"type": "inet", "da= ta": {"host": "0.0.0.0", "port": "9999"} } } } +{"execute": "nbd-server-add", "arguments": {"device": "parent0", "writable= ": true } } =20 Note: a. The qmp command nbd-server-start and nbd-server-add must be run @@ -222,11 +222,11 @@ Note: will be merged into the parent disk on failover. =20 4. On Primary VM's QEMU monitor, issue command: -{'execute':'qmp_capabilities'} -{'execute': 'human-monitor-command', 'arguments': {'command-line': 'drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0'}} -{'execute': 'x-blockdev-change', 'arguments':{'parent': 'colo-disk0', 'nod= e': 'replication0' } } -{'execute': 'migrate-set-capabilities', 'arguments': {'capabilities': [ {'= capability': 'x-colo', 'state': true } ] } } -{'execute': 'migrate', 'arguments': {'uri': 'tcp:127.0.0.2:9998' } } +{"execute":"qmp_capabilities"} +{"execute": "human-monitor-command", "arguments": {"command-line": "drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0"}} +{"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", "nod= e": "replication0" } } +{"execute": "migrate-set-capabilities", "arguments": {"capabilities": [ {"= capability": "x-colo", "state": true } ] } } +{"execute": "migrate", "arguments": {"uri": "tcp:127.0.0.2:9998" } } =20 Note: a. There should be only one NBD Client for each primary disk. @@ -249,59 +249,59 @@ if you want to resume the replication, follow "Second= ary resume replication" =3D=3D Primary Failover =3D=3D The Secondary died, resume on the Primary =20 -{'execute': 'x-blockdev-change', 'arguments':{ 'parent': 'colo-disk0', 'ch= ild': 'children.1'} } -{'execute': 'human-monitor-command', 'arguments':{ 'command-line': 'drive_= del replication0' } } -{'execute': 'object-del', 'arguments':{ 'id': 'comp0' } } -{'execute': 'object-del', 'arguments':{ 'id': 'iothread1' } } -{'execute': 'object-del', 'arguments':{ 'id': 'm0' } } -{'execute': 'object-del', 'arguments':{ 'id': 'redire0' } } -{'execute': 'object-del', 'arguments':{ 'id': 'redire1' } } -{'execute': 'x-colo-lost-heartbeat' } +{"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "ch= ild": "children.1"} } +{"execute": "human-monitor-command", "arguments":{ "command-line": "drive_= del replication0" } } +{"execute": "object-del", "arguments":{ "id": "comp0" } } +{"execute": "object-del", "arguments":{ "id": "iothread1" } } +{"execute": "object-del", "arguments":{ "id": "m0" } } +{"execute": "object-del", "arguments":{ "id": "redire0" } } +{"execute": "object-del", "arguments":{ "id": "redire1" } } +{"execute": "x-colo-lost-heartbeat" } =20 =3D=3D Secondary Failover =3D=3D The Primary died, resume on the Secondary and prepare to become the new Pr= imary =20 -{'execute': 'nbd-server-stop'} -{'execute': 'x-colo-lost-heartbeat'} +{"execute": "nbd-server-stop"} +{"execute": "x-colo-lost-heartbeat"} =20 -{'execute': 'object-del', 'arguments':{ 'id': 'f2' } } -{'execute': 'object-del', 'arguments':{ 'id': 'f1' } } -{'execute': 'chardev-remove', 'arguments':{ 'id': 'red1' } } -{'execute': 'chardev-remove', 'arguments':{ 'id': 'red0' } } +{"execute": "object-del", "arguments":{ "id": "f2" } } +{"execute": "object-del", "arguments":{ "id": "f1" } } +{"execute": "chardev-remove", "arguments":{ "id": "red1" } } +{"execute": "chardev-remove", "arguments":{ "id": "red0" } } =20 -{'execute': 'chardev-add', 'arguments':{ 'id': 'mirror0', 'backend': {'typ= e': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '0.0.0.0= ', 'port': '9003' } }, 'server': true } } } } -{'execute': 'chardev-add', 'arguments':{ 'id': 'compare1', 'backend': {'ty= pe': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '0.0.0.= 0', 'port': '9004' } }, 'server': true } } } } -{'execute': 'chardev-add', 'arguments':{ 'id': 'compare0', 'backend': {'ty= pe': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '127.0.= 0.1', 'port': '9001' } }, 'server': true } } } } -{'execute': 'chardev-add', 'arguments':{ 'id': 'compare0-0', 'backend': {'= type': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '127.= 0.0.1', 'port': '9001' } }, 'server': false } } } } -{'execute': 'chardev-add', 'arguments':{ 'id': 'compare_out', 'backend': {= 'type': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '127= .0.0.1', 'port': '9005' } }, 'server': true } } } } -{'execute': 'chardev-add', 'arguments':{ 'id': 'compare_out0', 'backend': = {'type': 'socket', 'data': {'addr': { 'type': 'inet', 'data': { 'host': '12= 7.0.0.1', 'port': '9005' } }, 'server': false } } } } +{"execute": "chardev-add", "arguments":{ "id": "mirror0", "backend": {"typ= e": "socket", "data": {"addr": { "type": "inet", "data": { "host": "0.0.0.0= ", "port": "9003" } }, "server": true } } } } +{"execute": "chardev-add", "arguments":{ "id": "compare1", "backend": {"ty= pe": "socket", "data": {"addr": { "type": "inet", "data": { "host": "0.0.0.= 0", "port": "9004" } }, "server": true } } } } +{"execute": "chardev-add", "arguments":{ "id": "compare0", "backend": {"ty= pe": "socket", "data": {"addr": { "type": "inet", "data": { "host": "127.0.= 0.1", "port": "9001" } }, "server": true } } } } +{"execute": "chardev-add", "arguments":{ "id": "compare0-0", "backend": {"= type": "socket", "data": {"addr": { "type": "inet", "data": { "host": "127.= 0.0.1", "port": "9001" } }, "server": false } } } } +{"execute": "chardev-add", "arguments":{ "id": "compare_out", "backend": {= "type": "socket", "data": {"addr": { "type": "inet", "data": { "host": "127= .0.0.1", "port": "9005" } }, "server": true } } } } +{"execute": "chardev-add", "arguments":{ "id": "compare_out0", "backend": = {"type": "socket", "data": {"addr": { "type": "inet", "data": { "host": "12= 7.0.0.1", "port": "9005" } }, "server": false } } } } =20 =3D=3D Primary resume replication =3D=3D Resume replication after new Secondary is up. =20 Start the new Secondary (Steps 2 and 3 above), then on the Primary: -{'execute': 'drive-mirror', 'arguments':{ 'device': 'colo-disk0', 'job-id'= : 'resync', 'target': 'nbd://127.0.0.2:9999/parent0', 'mode': 'existing', '= format': 'raw', 'sync': 'full'} } +{"execute": "drive-mirror", "arguments":{ "device": "colo-disk0", "job-id"= : "resync", "target": "nbd://127.0.0.2:9999/parent0", "mode": "existing", "= format": "raw", "sync": "full"} } =20 Wait until disk is synced, then: -{'execute': 'stop'} -{'execute': 'block-job-cancel', 'arguments':{ 'device': 'resync'} } +{"execute": "stop"} +{"execute": "block-job-cancel", "arguments":{ "device": "resync"} } =20 -{'execute': 'human-monitor-command', 'arguments':{ 'command-line': 'drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0'}} -{'execute': 'x-blockdev-change', 'arguments':{ 'parent': 'colo-disk0', 'no= de': 'replication0' } } +{"execute": "human-monitor-command", "arguments":{ "command-line": "drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0"}} +{"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "no= de": "replication0" } } =20 -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-mirror', 'id':= 'm0', 'netdev': 'hn0', 'queue': 'tx', 'outdev': 'mirror0' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-redirector', '= id': 'redire0', 'netdev': 'hn0', 'queue': 'rx', 'indev': 'compare_out' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-redirector', '= id': 'redire1', 'netdev': 'hn0', 'queue': 'rx', 'outdev': 'compare0' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'iothread', 'id': 'iot= hread1' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'colo-compare', 'id': = 'comp0', 'primary_in': 'compare0-0', 'secondary_in': 'compare1', 'outdev': = 'compare_out0', 'iothread': 'iothread1' } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id":= "m0", "netdev": "hn0", "queue": "tx", "outdev": "mirror0" } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "= id": "redire0", "netdev": "hn0", "queue": "rx", "indev": "compare_out" } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "= id": "redire1", "netdev": "hn0", "queue": "rx", "outdev": "compare0" } } +{"execute": "object-add", "arguments":{ "qom-type": "iothread", "id": "iot= hread1" } } +{"execute": "object-add", "arguments":{ "qom-type": "colo-compare", "id": = "comp0", "primary_in": "compare0-0", "secondary_in": "compare1", "outdev": = "compare_out0", "iothread": "iothread1" } } =20 -{'execute': 'migrate-set-capabilities', 'arguments':{ 'capabilities': [ {'= capability': 'x-colo', 'state': true } ] } } -{'execute': 'migrate', 'arguments':{ 'uri': 'tcp:127.0.0.2:9998' } } +{"execute": "migrate-set-capabilities", "arguments":{ "capabilities": [ {"= capability": "x-colo", "state": true } ] } } +{"execute": "migrate", "arguments":{ "uri": "tcp:127.0.0.2:9998" } } =20 Note: If this Primary previously was a Secondary, then we need to insert the filters before the filter-rewriter by using the -"'insert': 'before', 'position': 'id=3Drew0'" Options. See below. +""insert": "before", "position": "id=3Drew0"" Options. See below. =20 =3D=3D Secondary resume replication =3D=3D Become Primary and resume replication after new Secondary is up. Note @@ -309,23 +309,23 @@ that now 127.0.0.1 is the Secondary and 127.0.0.2 is = the Primary. =20 Start the new Secondary (Steps 2 and 3 above, but with primary_ip=3D127.0.= 0.2), then on the old Secondary: -{'execute': 'drive-mirror', 'arguments':{ 'device': 'colo-disk0', 'job-id'= : 'resync', 'target': 'nbd://127.0.0.1:9999/parent0', 'mode': 'existing', '= format': 'raw', 'sync': 'full'} } +{"execute": "drive-mirror", "arguments":{ "device": "colo-disk0", "job-id"= : "resync", "target": "nbd://127.0.0.1:9999/parent0", "mode": "existing", "= format": "raw", "sync": "full"} } =20 Wait until disk is synced, then: -{'execute': 'stop'} -{'execute': 'block-job-cancel', 'arguments':{ 'device': 'resync' } } +{"execute": "stop"} +{"execute": "block-job-cancel", "arguments":{ "device": "resync" } } =20 -{'execute': 'human-monitor-command', 'arguments':{ 'command-line': 'drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.1,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0'}} -{'execute': 'x-blockdev-change', 'arguments':{ 'parent': 'colo-disk0', 'no= de': 'replication0' } } +{"execute": "human-monitor-command", "arguments":{ "command-line": "drive_= add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.hos= t=3D127.0.0.1,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplicatio= n0"}} +{"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "no= de": "replication0" } } =20 -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-mirror', 'id':= 'm0', 'insert': 'before', 'position': 'id=3Drew0', 'netdev': 'hn0', 'queue= ': 'tx', 'outdev': 'mirror0' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-redirector', '= id': 'redire0', 'insert': 'before', 'position': 'id=3Drew0', 'netdev': 'hn0= ', 'queue': 'rx', 'indev': 'compare_out' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'filter-redirector', '= id': 'redire1', 'insert': 'before', 'position': 'id=3Drew0', 'netdev': 'hn0= ', 'queue': 'rx', 'outdev': 'compare0' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'iothread', 'id': 'iot= hread1' } } -{'execute': 'object-add', 'arguments':{ 'qom-type': 'colo-compare', 'id': = 'comp0', 'primary_in': 'compare0-0', 'secondary_in': 'compare1', 'outdev': = 'compare_out0', 'iothread': 'iothread1' } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id":= "m0", "insert": "before", "position": "id=3Drew0", "netdev": "hn0", "queue= ": "tx", "outdev": "mirror0" } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "= id": "redire0", "insert": "before", "position": "id=3Drew0", "netdev": "hn0= ", "queue": "rx", "indev": "compare_out" } } +{"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "= id": "redire1", "insert": "before", "position": "id=3Drew0", "netdev": "hn0= ", "queue": "rx", "outdev": "compare0" } } +{"execute": "object-add", "arguments":{ "qom-type": "iothread", "id": "iot= hread1" } } +{"execute": "object-add", "arguments":{ "qom-type": "colo-compare", "id": = "comp0", "primary_in": "compare0-0", "secondary_in": "compare1", "outdev": = "compare_out0", "iothread": "iothread1" } } =20 -{'execute': 'migrate-set-capabilities', 'arguments':{ 'capabilities': [ {'= capability': 'x-colo', 'state': true } ] } } -{'execute': 'migrate', 'arguments':{ 'uri': 'tcp:127.0.0.1:9998' } } +{"execute": "migrate-set-capabilities", "arguments":{ "capabilities": [ {"= capability": "x-colo", "state": true } ] } } +{"execute": "migrate", "arguments":{ "uri": "tcp:127.0.0.1:9998" } } =20 =3D=3D TODO =3D=3D 1. Support shared storage. diff --git a/docs/block-replication.txt b/docs/block-replication.txt index 59eb2b33b3..b0f23761c6 100644 --- a/docs/block-replication.txt +++ b/docs/block-replication.txt @@ -156,15 +156,15 @@ Primary: children.0.driver=3Draw =20 Run qmp command in primary qemu: - { 'execute': 'human-monitor-command', - 'arguments': { - 'command-line': 'drive_add -n buddy driver=3Dreplication,mode=3D= primary,file.driver=3Dnbd,file.host=3Dxxxx,file.port=3Dxxxx,file.export=3Dc= olo1,node-name=3Dnbd_client1' + { "execute": "human-monitor-command", + "arguments": { + "command-line": "drive_add -n buddy driver=3Dreplication,mode=3D= primary,file.driver=3Dnbd,file.host=3Dxxxx,file.port=3Dxxxx,file.export=3Dc= olo1,node-name=3Dnbd_client1" } } - { 'execute': 'x-blockdev-change', - 'arguments': { - 'parent': 'colo1', - 'node': 'nbd_client1' + { "execute": "x-blockdev-change", + "arguments": { + "parent": "colo1", + "node": "nbd_client1" } } Note: @@ -189,21 +189,21 @@ Secondary: vote-threshold=3D1,children.0=3Dchilds1 =20 Then run qmp command in secondary qemu: - { 'execute': 'nbd-server-start', - 'arguments': { - 'addr': { - 'type': 'inet', - 'data': { - 'host': 'xxx', - 'port': 'xxx' + { "execute": "nbd-server-start", + "arguments": { + "addr": { + "type": "inet", + "data": { + "host": "xxx", + "port": "xxx" } } } } - { 'execute': 'nbd-server-add', - 'arguments': { - 'device': 'colo1', - 'writable': true + { "execute": "nbd-server-add", + "arguments": { + "device": "colo1", + "writable": true } } =20 @@ -223,22 +223,22 @@ After Failover: Primary: The secondary host is down, so we should run the following qmp command to remove the nbd child from the quorum: - { 'execute': 'x-blockdev-change', - 'arguments': { - 'parent': 'colo1', - 'child': 'children.1' + { "execute": "x-blockdev-change", + "arguments": { + "parent": "colo1", + "child": "children.1" } } - { 'execute': 'human-monitor-command', - 'arguments': { - 'command-line': 'drive_del xxxx' + { "execute": "human-monitor-command", + "arguments": { + "command-line": "drive_del xxxx" } } Note: there is no qmp command to remove the blockdev now =20 Secondary: The primary host is down, so we should do the following thing: - { 'execute': 'nbd-server-stop' } + { "execute": "nbd-server-stop" } =20 Promote Secondary to Primary: see COLO-FT.txt --=20 2.27.0