Managing mirroring on a pool

Learn to enable and disable mirroring on a Ceph Block Device pool by using the command-line interface. You can also get the mirroring status for a pool.

Before you begin

Before you begin, make sure that you have root-level access to the node.

Enabling mirroring on a pool

Procedure

Enable mirroring on a pool, by using the mirror pool enable command.
Be sure to run the command on both peer clusters.
rbd mirror pool enable POOL_NAME MODE
The following example enables pool mode mirroring of the whole pool named data.
[root@rbd-client ~]# rbd mirror pool enable data pool

Disabling mirroring on a pool

Before you begin

Before disabling mirroring, remove any related peer clusters.

About this task

When you disable mirroring on a pool, you also disable it on any images within the pool for which mirroring was enabled separately in image mode.

Procedure

Disable mirroring on a pool, by using the mirror pool disable command.
rbd mirror pool disable POOL_NAME
The following example disables mirroring of a pool named data.
[root@rbd-client ~]# rbd mirror pool disable data

Getting mirroring status for a pool

About this task

Get the mirroring pool status summary, by using the mirror pool status command.

Procedure

Run the following command to get the pool status.
Syntax
rbd mirror pool status POOL_NAME

To output status details for every mirroring image in a pool, use the --verbose option.

Example
[root@site-a ~]# rbd mirror pool status data
health: OK
daemon health: OK
image health: OK
images: 1 total
    1 replaying