Failover and failback are operations that handle a situation in which the link between the local and the remote systems is down. These operations switch the roles of the source and the target. The Replica Switch Roles starts with a source and a target that are both live and linked between them.
On a Failover scenario, the link between the source and the target is down and the target is connected to a host can serve it. To do so, the target has to have its role changed to a source. As the target serves the host, the replica gets into an Auto Suspended state. During this phase, the target and the source are no longer consistent.
In this phase, we change the role of the target to source. The volume becomes write-enable, as it will now accept host writes.
Once the link is back, there is a need to synchronize the target – that has accepted host writes during the Failover – and the source. To do so, the target remains a source, and its volume is replicated to the other side of the replica, to the old source. To allow the replication in this direction, we change the role of the source to target. When changing source to target, the volume becomes write-disable and the replica will be suspended.
The user resumes the replication and the target and source become synchronized.
Now, we return both source and target to their original roles, and the replica returns to the state it was prior to the failover.