switchrcconsistgrp

Use the switchrcconsistgrp command to reverse the roles of the primary and secondary volumes in a Metro Mirror or Global Mirror consistency group when that consistency group is in a consistent state. All the relationships in the consistency group are affected by this change.

Syntax

switchrcconsistgrp -primary { master | aux } { rc_consist_group_id | rc_consist_group_name }

Parameters

-primarymaster | aux
(Required) Specifies whether the master or auxiliary side of the relationships in the group will become the primary volumes.
rc_consist_group_id | rc_consist_group_name
(Required) Specifies the ID or name of the consistency group to switch.

Description

This command applies to a consistency group. It is normally issued to reverse the roles of the primary and secondary volumes in a consistency group, perhaps as part of a failover process that is associated with a disaster recovery event.

Write access to the former primary volumes is lost and write access to the new primary volumes is acquired.

This command is successful when the consistency group is in a connected, consistent state, and when reversing the direction of the relationships would not lead to a loss of consistency, for example, when the consistency group is consistent and synchronized. The consistency group must be in one of the following states in order for the switchrcconsistgrp command to process correctly:
  • ConsistentSynchronized
  • ConsistentStopped and Synchronized
  • Idling and Synchronized
    Note: This command is rejected under any of the following conditions:
    • You switch consistency group relationship so that the new secondary becomes the target volume of an active FlashCopy mapping.
    • Any of the indicated secondary volumes (in the consistency group) are the target of an existing FlashCopy mapping.
    • Using Global Mirroring with the multi cycling mode
The consistency group moves to the ConsistentSynchronized state after the successful completion of this command. If you specify the -primary parameter and it is the same as the current primary, the command has no effect.

When the direction of the consistency group is changed, a volume that is a secondary volume in a remote copy relationship becomes a primary volume. In addition, a primary volume that is in a remote copy relationship becomes a secondary volume. If the resultant secondary volume is mapped to a host of type hide_secondary, it is no longer presented to that host. However, the mapping still exists for configuration purposes. If the volume that was a secondary volume before the switch is mapped to a host of type hide_secondary, it is presented to that host because it is no longer a secondary volume.

You cannot switch directions for an active-active consistency group.

An invocation example

switchrcconsistgrp -primary aux rccopy2

The resulting output:

No feedback