Symantec logo

Restoring the original Primary in a bunker setup

In most cases, when the original Primary recovers after a failure, you would want to restore the RDS to the original configuration. In a bunker setup, how you restore the Primary role to the original Primary depends on the status of the bunker replay.

Recovering the original Primary during bunker replay

If the original Primary recovers during the replay of a bunker SRL, the original Secondary has not taken over the Primary role. You can restore operation to the original Primary without completing the replay and the Secondary takeover of the Primary role.

After the bunker is activated and is replaying the bunker SRL, the bunker is acting in the Primary role. If the original Primary recovers and connects while the bunker is active, the RDS shows a configuration error of multiple Primaries in the RDS. Deactivating the bunker clears the configuration error, and restores the original Primary as the only Primary in the RDS.

 To restore the original primary

  1. Stop the replication from the bunker to the Secondary:

    # vradmin -g hrdg2 stoprep hr_rvg

  2. Deactivate the bunker. Issue the following command on the bunker host:

    # vradmin -g hrdg2 deactivatebunker hr_rvg

    After the original Primary has recovered and connected, replication resumes from the Primary.

Primary replay to the Secondary resumes from the point in the SRL indicating the last write received by the Secondary. The SRL indicates the writes that have been replayed from the bunker and does not resynchronize those writes. For example, suppose the bunker SRL contained 10 GB when the Primary failed. After 7 GB of the writes were replayed to the Secondary, the Primary recovered. The Primary only needs to synchronize the 3 GB of pending data.

If the bunker setup is using IP protocol, replication from the Primary to the bunker also resumes automatically.

If the bunker storage is connected to the Primary using the STORAGE protocol, then the disk group containing the bunker SRL is imported on the bunker host during the replay. When the Primary recovers, this disk group must be made available to the Primary host again, as follows:

  1. Deport the disk group from the bunker host:

    # vxdg deport hrdg2

  2. Import the disk group on the Primary host and recover the objects. Issue the following commands on the Primary host:

    # vxdg import hrdg2

    # vxrecover -g hrdg2 -ns

    Replication from the Primary to the bunker now resumes.

Failing back to the original Primary

If the original Secondary has taken over the role of the Primary, fail back the Primary role to the original Primary. Before failing back to the original Primary, make sure all of the writes on the new Primary have been replayed on the original Primary.

If the original Secondary is converted to be the new Primary before all the writes on the bunker SRL are replayed, the failback process synchronizes the remaining writes. The failback process detects the status of the bunker replay, and does not synchronize any writes in the bunker SRL that have already been replayed. For example, suppose the bunker SRL contained 10 GB when the Primary failed. After 7 GB of the writes were replayed to the Secondary, the replay was stopped and the Secondary converted to the new Primary. When the original Primary recovers, the failback process only needs to synchronize the 3 GB of pending data.

For more information about failing back, see Failing back to the original Primary.

After the failback completes, and the Primary role is restored to the original Primary, you should restart replication to the bunker. The Primary RLINK to the bunker is detached when the original Primary becomes the Secondary of the new Primary as part of the failback process. Therefore, after the original Primary again becomes the Primary, you must reestablish the RLINK between the bunker and the Primary. For details, see Restoring the bunker setup after failback to original Primary.

Restoring the bunker setup after failback to original Primary

After the original Primary is restored and the failback is complete, restore the bunker setup so that the bunker is again replicating the SRL of the original Primary.

 To restore the bunker setup when using the STORAGE protocol

If the bunker storage is connected to the Primary using the STORAGE protocol, then the disk group containing the bunker SRL is imported on the bunker host during the replay. When the Primary recovers, this disk group must be made available to the Primary host again.

  1. Deport the disk group from the bunker host:

    # vxdg deport hrdg2

  2. Import the disk group on the Primary host and recover the objects. Issue the following commands on the Primary host:

    # vxdg import hrdg2

    # vxrecover -g hrdg2 -ns

  3. To deactivate the bunker, if it is not already deactivated, issue the following command on the bunker host:

    # vradmin -g hrdg2 deactivatebunker hr_rvg

  4. Restart replication from the Primary to the bunker:

    # vradmin -g hrdg -a startrep hr_rvg portland

 To restore the bunker setup when using the IP protocol

  1. Deactivate the bunker, if it is not already deactivated. Issue the following command on the bunker host:

    # vradmin -g hrdg2 deactivatebunker hr_rvg

  2. Restart replication from the Primary to the bunker.

    # vradmin -g hrdg -a startrep hr_rvg portland