Preparing for fail back
If two storage clusters were originally configured only for one-way mirroring, in order to fail back, configure the primary storage cluster for mirroring in order to replicate the images in the opposite direction.
During failback scenario, the existing peer that is inaccessible must be removed before adding a new peer to an existing cluster.
Prerequisites
-
A running IBM Storage Ceph cluster.
-
Root-level access to the client node.
Procedure
-
Log into the
cephadmshell:Example
[root@rbd-client ~]# cephadm shell -
On the
site-astorage cluster , run the following command:Example
[ceph: root@rbd-client /]# ceph orch apply rbd-mirror --placement=host01 - Remove any inaccessible peers.Important: This step must be run on the peer site which is up and running.Note: Multiple peers are supported only for one way mirroring.
- Get the pool UUID:Syntax
rbd mirror pool info POOL_NAMEExample[ceph: root@host01 /]# rbd mirror pool info pool_failback - Remove the inaccessible peer:Syntax
rbd mirror pool peer remove POOL_NAME PEER_UUIDExample[ceph: root@host01 /]# rbd mirror pool peer remove pool_failback f055bb88-6253-4041-923d-08c4ecbe799a
- Get the pool UUID:
- Create a block device pool with a name same as its peer mirror pool.
- To create an rbd pool, run the following:
Syntax
ceph osd pool create POOL_NAME PG_NUMceph osd pool application enable POOL_NAME rbdrbd pool init -p POOL_NAMEExample
[root@rbd-client ~]# ceph osd pool create pool1[root@rbd-client ~]# ceph osd pool application enable pool1 rbd[root@rbd-client ~]# rbd pool init -p pool1
- To create an rbd pool, run the following:
-
On a Ceph client node, bootstrap the storage cluster peers.
-
Create Ceph user accounts, and register the storage cluster peer to the pool:
Syntax
rbd mirror pool peer bootstrap create --site-name LOCAL_SITE_NAME POOL_NAME > PATH_TO_BOOTSTRAP_TOKENExample
[ceph: root@rbd-client-site-a /]# rbd mirror pool peer bootstrap create --site-name site-a data > /root/bootstrap_token_site-aNote: This example bootstrap command creates theclient.rbd-mirror.site-aand theclient.rbd-mirror-peerCeph users. -
Copy the bootstrap token file to the
site-bstorage cluster. -
Import the bootstrap token on the
site-bstorage cluster:Syntax
rbd mirror pool peer bootstrap import --site-name LOCAL_SITE_NAME --direction rx-only POOL_NAME PATH_TO_BOOTSTRAP_TOKENExample
[ceph: root@rbd-client-site-b /]# rbd mirror pool peer bootstrap import --site-name site-b --direction rx-only data /root/bootstrap_token_site-aNote: For one-way RBD mirroring, you must use the--direction rx-onlyargument, as two-way mirroring is the default when bootstrapping peers.
-
-
From a monitor node in the
site-astorage cluster, verify thesite-bstorage cluster was successfully added as a peer:Example
[ceph: root@rbd-client /]# rbd mirror pool info -p data Mode: image Peers: UUID NAME CLIENT d2ae0594-a43b-4c67-a167-a36c646e8643 site-b client.site-b
Reference
For more information, see Ceph user management