Managing mirroring on a namespace
Enable and disable Ceph Block Device mirroring on namespaces by using the command-line interface.
Before you begin
About this task
Before configuring a namespace to mirror with a different remote namespace, mirroring must be disabled for both the local and remote namespaces on both the clusters.
Enabling mirroring on a namespace
Before you begin
- 2 running IBM Storage Ceph clusters.
rbd-mirrordaemon service enabled on both clusters.- Mirroring is in enabled for the pool in which the namespace is added.Note:
About this task
You can mirror a namespace to a namespace with a different name in the remote pool by using the --remote-namespace option. By default, the namespace is mirrored with the same name on the remote pool.
Procedure
Enable mirroring on a namespace, by using the mirror pool enable
command. Be sure to run the command on both peer clusters.
Syntax
rbd mirror pool enable POOL_NAME/LOCAL_NAMESPACE_NAMEMODE --remote-namespace REMOTE_NAMESPACE_NAMEThe
mirroring mode options are image or pool. The default
mirroring mode is
pool.image- When configured in
imagemode, mirroring must be explicitly enabled on each image.
pool- When configured in
poolmode, all images in the namespace with the journaling feature enabled are mirrored.
The namespace and remote namespace on the first cluster must match the remote namespace
and namespace respectively on the remote cluster.
Note: If the
--remote-namespace option is not provided, the namespace is mirrored to a
namespace with the same name in the remote pool.
The following example
enables image mode mirroring between
image-pool/namespace-a on the first cluster
and image-pool/namespace-b on the second, remote, cluster.
[root@rbd-client ~]# rbd mirror pool enable image-pool/namespace-a image --remote-namespace namespace-b [root@rbd-client ~]# rbd mirror pool enable image-pool/namespace-b image --remote-namespace namespace-a
Disabling mirroring on a namespace
Before you begin
image mode.About this task
Procedure
Run the following command to disable mirroring on a namespace.
Syntax
rbd mirror pool disable POOL_NAME/NAMESPACE_NAMEExample
[root@rbd-client ~]# rbd mirror pool disable image-pool/namespace-a [root@rbd-client ~]# rbd mirror pool disable image-pool/namespace-b