Lines Matching +full:layer +full:- +full:primary

2 ----------------------------------------
8 See the COPYING file in the top-level directory.
11 for COLO (COarse-grain LOck-stepping) where the Secondary VM is running.
12 It can also be applied for FT/HA (Fault-tolerance/High Assurance) scenario,
19 consecutive checkpoints. The VM state of the Primary and Secondary VM is
25 the Primary disk are asynchronously forwarded to the Secondary node.
30 +----------------------+ +------------------------+
31 |Primary Write Requests| |Secondary Write Requests|
32 +----------------------+ +------------------------+
36 | /-------------\
38 |---------(1)----------+ | Disk Buffer |
40 | (3) \-------------/
45 +--------------+ +----------------+
46 | Primary Disk | | Secondary Disk |
47 +--------------+ +----------------+
49 1) Primary write requests will be copied and forwarded to Secondary
51 2) Before Primary write requests are written to Secondary disk, the
55 previous COW of "Primary Write Requests") in the Disk buffer.
56 3) Primary write requests will be written to Secondary disk.
64 virtio-blk ||
65 ^ || .----------
67 1 Quorum || '----------
68 / \ || virtio-blk
70 Primary 2 filter |
73 3 NBD -------> 3 NBD /
76 --------. || | |
77 Primary | || Secondary disk <--------- hidden-disk 5 <--------- active-disk 4
78 --------' || | backing ^ backing
81 || '-------------------------'
82 || blockdev-backup sync=none 6
84 1) The disk on the primary is represented by a block device with two
85 children, providing replication between a primary disk and the host that
87 to make the primary always read from the local disk instead of going through
93 3) The secondary disk receives writes from the primary VM through QEMU's
94 embedded NBD server (speculative write-through).
97 (called active-disk). It should start as an empty disk, and the format
100 5) The hidden-disk is created automatically. It buffers the original content
101 that is modified by the primary VM. It should also start as an empty disk,
104 6) The blockdev-backup job (sync=none) is run to allow hidden-disk to buffer
105 any state that would otherwise be lost by the speculative write-through
107 the primary disk and secondary disk should contain the same data.
110 can become the new primary and continue replication.
115 1. I/O error on primary disk
116 2. Forwarding primary write requests failed
122 In case 1 and 5, we just report the error to the disk layer. In case 2, 3,
133 calling block_replication_start_all() in primary QEMU. The caller
153 Primary:
154 -drive if=xxx,driver=quorum,read-pattern=fifo,id=colo1,vote-threshold=1,\
158 Run qmp command in primary qemu:
159 { "execute": "human-monitor-command",
161 …"command-line": "drive_add -n buddy driver=replication,mode=primary,file.driver=nbd,file.host=xxxx…
164 { "execute": "x-blockdev-change",
171 1. There should be only one NBD Client for each primary disk.
174 4. It is all a single argument to -drive and you should ignore the
178 6. After primary failover we need remove children.1 (replication driver).
181 -drive if=none,driver=raw,file.filename=1.raw,id=colo1 \
182 -drive if=none,id=childs1,driver=replication,mode=secondary,top-id=top-disk1
188 -drive if=xxx,driver=quorum,read-pattern=fifo,id=top-disk1,\
189 vote-threshold=1,children.0=childs1
192 { "execute": "nbd-server-start",
203 { "execute": "nbd-server-add",
214 3. The qmp command nbd-server-start and nbd-server-add must be run
215 before running the qmp command migrate on primary QEMU
219 6. It is all a single argument to -drive, and you should ignore
223 Primary:
226 { "execute": "x-blockdev-change",
232 { "execute": "human-monitor-command",
234 "command-line": "drive_del xxxx"
240 The primary host is down, so we should do the following thing:
241 { "execute": "nbd-server-stop" }
243 Promote Secondary to Primary:
244 see COLO-FT.txt