root@local-site:/temp# rbd --version ceph version 10.2.7 (50e863e0f4bc8f4b9e31156de690d765af245185) root@local-site:/temp# rbd-mirror --version ceph version 10.2.7 (50e863e0f4bc8f4b9e31156de690d765af245185) root@local-site:/temp# rbd -p cinder_backup ls root@local-site:/temp# rbd --cluster remote -p cinder_backup ls root@local-site:/temp# rbd -p cinder_backup import ./example.img example.img Importing image: 100% complete...done. root@local-site:/temp# rbd -p cinder_backup feature enable example.img journaling root@local-site:/temp# ssh distantend service rbd-mirror start root@local-site:/temp# rbd --cluster remote -p cinder_backup ls example.img root@local-site:/temp# rbd --cluster remote -p cinder_backup export example.img mirror.img Exporting image: 100% complete...done. root@local-site:/temp# cmp example.img mirror.img root@local-site:/temp# ^cmp^sha256sum sha256sum example.img mirror.img 263a1c96b080015e3757d81633750c237d11b4a44b6b7539c8fc7d2b066e464c example.img 263a1c96b080015e3757d81633750c237d11b4a44b6b7539c8fc7d2b066e464c mirror.img root@local-site:/temp# ssh distantend service rbd-mirror stop root@local-site:/temp# rbd -p cinder_backup rm example.img Removing image: 100% complete...done. root@local-site:/temp# rbd -p cinder_backup ls root@local-site:/temp# rbd --cluster remote -p cinder_backup ls example.img root@local-site:/temp# rbd --cluster remote -p cinder_backup mirror image promote example.img --force Image promoted to primary root@local-site:/temp# rbd -p cinder_backup ls example.img root@local-site:/temp# rbd -p cinder_backup mirror pool status --verbose health: OK images: 1 total 1 replaying example.img: global_id: 6c0baf43-7e7f-47d6-9101-93f57af6281c state: up+replaying description: replaying, master_position=[], mirror_position=[], entries_behind_master=0 last_update: 2017-05-03 17:39:52 root@local-site:/temp# rbd -p cinder_backup export example.img copy.img Exporting image: 100% complete...done. root@local-site:/temp# cmp example.img copy.img example.img copy.img differ: byte 1, line 1 root@local-site:/temp# xxd copy.img | head -4 0000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ root@local-site:/temp# rbd -p cinder_backup mirror image resync example.img Flagged image for resync from primary root@local-site:/temp# rbd -p cinder_backup mirror pool status --verbose health: OK images: 0 total root@local-site:/temp# rbd -p cinder_backup mirror pool status --verbose health: WARNING images: 1 total 1 syncing example.img: global_id: 6c0baf43-7e7f-47d6-9101-93f57af6281c state: up+syncing description: bootstrapping, OPEN_REMOTE_IMAGE last_update: 2017-05-03 17:41:52 root@local-site:/temp# rbd -p cinder_backup mirror pool status --verbose health: OK images: 1 total 1 replaying example.img: global_id: 6c0baf43-7e7f-47d6-9101-93f57af6281c state: up+replaying description: replaying, master_position=[object_number=3, tag_tid=3, entry_tid=3], mirror_position=[], entries_behind_master=3 last_update: 2017-05-03 17:41:55 root@local-site:/temp# cmp example.img sync.img root@local-site:/temp# ^cmp^sha256sum sha256sum example.img sync.img 263a1c96b080015e3757d81633750c237d11b4a44b6b7539c8fc7d2b066e464c example.img 263a1c96b080015e3757d81633750c237d11b4a44b6b7539c8fc7d2b066e464c sync.img