Ceph RBD mirroring
Check replication
See how much journal data is yet to be replicated, where 'sas' is the pool containing the journal data
1rados ls -p sas | grep journal | wc -l
Enable mirroring for an image
Step 1 - Enable journaling feature for the image(You can place the journal data on a separate pool)
1rbd feature enable sas/ADLWest-R3.raw journaling
Check to see if the journaling flag has applied
1[root@adleast-cephreplica ~]# rbd info sas/ADLWest-R3.raw
2rbd image 'ADLWest-R3.raw':
3 size 128 MB in 32 objects
4 order 22 (4096 kB objects)
5 block_name_prefix: rbd_data.2e931f238e1f29
6 format: 2
7 features: layering, exclusive-lock<, object-map, fast-diff, deep-flatten, journaling
8 flags:
9 journal: 2e931f238e1f29
10 mirroring state: disabled
Enable mirroring
1rbd mirror image enable sas/ADLWest-R3.raw
Check to see if mirroring has applied
1[root@adleast-cephreplica ~]# rbd info sas/ADLWest-R3.raw
2rbd image 'ADLWest-R3.raw':
3 size 128 MB in 32 objects
4 order 22 (4096 kB objects)
5 block_name_prefix: rbd_data.2e931f238e1f29
6 format: 2
7 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten, journaling
8 flags:
9 journal: 2e931f238e1f29
10 mirroring state: enabled
11 mirroring global id: 1c590dca-9123-4613-95d8-2267338f4e8a
12 mirroring primary: true