chrcrelationship

The chrcrelationship command enables you to modify certain attributes of an existing relationship, such as to add a relationship to a consistency group, to remove a relationship from a consistency group, and to change the name of the relationship. You can only change one attribute at a time per command submittal.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- svctask -- -- chrcrelationship -- -------------------------->

>--+- -name -- new_name_arg -----------------+------------------>
   +- -force --------------------------------+   
   '- -consistgrp --+- consist_group_id ---+-'   
                    '- consist_group_name -'     

>--+- rc_rel_id ---+-------------------------------------------><
   '- rc_rel_name -'   

Parameters

-name new_name_arg
(Optional) Specifies a new label to assign to the relationship.
This parameter is required if you do not specify the -consistgrp or -force parameter.
-consistgrp consist_group_id | consist_group_name
(Optional) Specifies a new consistency group to assign the relationship to. Only relationships of the same copy type (Metro Mirror or Global Mirror) can be assigned to the same consistency group. You cannot use this parameter with the -name, or -force parameters.
This parameter is required if you do not specify the -name or -force parameter.
-force
(Optional) Specifies that you want the system to remove the relationship from a consistency group making the relationship a stand-alone relationship. You cannot use this parameter with the -name or -consistgrp parameters.
This parameter is required if you do not specify the -name or -consistgrp parameter.
rc_rel_name | rc_rel_id
(Required) Specifies the ID or name of the relationship.

Description

This command modifies the specified attributes of the supplied relationship, one attribute at a time; you cannot use more than one of the three optional parameters in the same command. In addition to changing the name of a consistency group, this command can be used for the following purposes.
  • You can add a stand-alone relationship to a consistency group by specifying the -consistgrp parameter and the name or ID of the consistency group. The relationship and consistency group must be connected when the command is issued and must share the following components:
    • Master cluster
    • Auxiliary cluster
    • State (unless the group is empty)
    • Primary (unless the group is empty)
    • Type (unless the group is empty)
    When the first relationship is added to an empty group, the group takes on the same state, primary (copy direction), and type (Metro or Global Mirror) as the relationship. Subsequent relationships must have the same state, copy direction, and type as the group in order to be added to it. A relationship can only belong to one consistency group.
  • You can remove a relationship from a consistency group by specifying the -force parameter and the name or ID of the relationship. Although you do not have to specify or confirm the name of the consistency group, verify which group the relationship belongs to before you issue this command.
    This form of the modify relationship command succeeds in the connected or disconnected states. If the clusters are disconnected the relationship is only removed from the consistency group on the local cluster, at the time the command is issued. When the clusters are reconnected the relationship is automatically removed from the consistency group on the other cluster. Alternatively, you can issue an explicit modify (chrcrelationship) command to remove the relationship from the group on the other cluster while it is still disconnected.
    Note: If you remove all relationships from the group, the relationship type is reset to empty_group. When you add a relationship to the empty group, the group again takes on the same type as the relationship.
  • To move a relationship between two consistency groups, you must issue the chrcrelationship command twice. Use the -force parameter to remove the relationship from its current group, and then use the -consistgrp parameter with the name of the new consistency group.

An invocation example

Change the name of the relationship rccopy1 to testrel

svctask chrcrelationship -name testrel rccopy1
Add relationship rccopy2 to group called newgroup.
svctask chrcrelationship -consistgrp newgroup rccopy2
Remove relationship rccopy3 from whichever consistency group it is a member of.
svctask chrcrelationship -force rccopy3
The resulting output
No feedback

There is no feedback in any of these cases.

Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.