The following recipes will show how to fail over to the mirrored data on the backup
cluster after the primary cluster ceph
has encountered a disaster and how to failback once the ceph
cluster has recovered. There are two methods for failover when dealing with a disaster:
- Orderly: Failover after an orderly shutdown. This would be a proper shutdown of the cluster and demotion and promotion of the image.
- Non-orderly: Failover after a non-orderly shutdown. This would be a complete loss of the primary cluster. In this case, the failback would require a resynchronizing of the image.
- How to properly failover after an orderly shutdown:
- Stop all client's that are writing to the primary image
- Demote the primary image located on the
ceph
cluster:
# rbd mirror image demote data/image-1
- Promote the non-primary image located on the
backup
cluster:
- Promote the non-primary image located on the
# rbd-mirror image promote data/image-1
- Validate image has become primary on the
backup
cluster...
- Validate image has become primary on the