mkrcrelationship

The mkrcrelationship command creates a new Metro Mirror or Global Mirror relationship with virtual disks (VDisks) in the same cluster (intracluster relationship) or in two different clusters (intercluster relationship).

Syntax

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

>-- -master --+- master_vdisk_id ---+-- ------------------------>
              '- master_vdisk_name -'      

>-- -aux --+- aux_vdisk_id ---+-- ------------------------------>
           '- aux_vdisk_name -'      

>-- -cluster --+- cluster_id ---+-- ---------------------------->
               '- cluster_name -'      

>--+------------------------+-- -------------------------------->
   '- -name -- new_name_id -'      

>--+-----------------------------------------+-- --------------->
   '- -consistgrp --+- consist_group_id ---+-'      
                    '- consist_group_name -'        

>--+---------+-- --+-----------+-------------------------------><
   '- -sync -'     '- -global -'   

Parameters

-master master_vdisk_id | master_vdisk_name
(Required) Specifies the ID or name of the master virtual disk.
-aux aux_vdisk_id | aux_vdisk_name
(Required) Specifies the ID or name of the auxiliary virtual disk.
-cluster cluster_id | cluster_name
(Required) Specifies the ID or name of the remote cluster.
If you are creating an intracluster relationship, enter the ID of the local cluster. The VDisks in the relationship must belong to the same I/O group within the cluster.
If you are creating an intercluster relationship, enter the ID of the remote cluster. To create a relationship in two different clusters, the clusters must be connected at the time that the svctask mkrcrelationship command is received.
-name new_name_id
(Optional) Specifies a label to assign to the relationship.
-consistgrp consist_group_id | consist_group_name
(Optional) Specifies a consistency group that this relationship joins. If you do not supply the -consistgrp parameter, the relationship is created as a stand-alone relationship that can be started, stopped, and switched on its own.
Note: Metro and Global Mirror relationships cannot belong to the same consistency group. When the first relationship is added to the consistency group, the group takes on the same type as the relationship. Subsequently, only relationships of that type can be added to the consistency group.
-sync
(Optional) Specifies that you want the system to create a synchronized relationship. The -sync parameter guarantees that the master and auxiliary disks contain identical data at the point that the relationship is created. You must ensure that the auxiliary disk is created to match the master disk and that no input transactions take place to either disk before you issue the create command. The initial background synchronization is skipped.
-global
(Optional) Specifies that you want the system to create a new Global Mirror relationship. If you do not specify the -global parameter, a Metro Mirror relationship is created instead.

Description

This command creates a new Metro Mirror or Global Mirror relationship. A Metro Mirror relationship defines the relationship between two virtual disks (VDisks): a master VDisk and an auxiliary VDisk. This relationship persists until it is deleted. The auxiliary virtual disk must be identical in size to the master virtual disk or the command fails, and if both VDisks are in the same cluster, they must both be in the same I/O group. The master and auxiliary cannot be in an existing relationship. Neither disk can be the target of a FlashCopy® mapping. The command also returns the new relationship ID.

Metro Mirror relationships use one of the following copy types:
  • A Metro Mirror copy ensures that updates are committed to both the primary and secondary VDisks before sending confirmation of I/O completion to the host application. This ensures that the secondary VDisk is synchronized with the primary VDisk in the event that a failover operation is performed.
  • A Global Mirror copy allows the host application to receive confirmation of I/O completion before the updates are committed to the secondary VDisk. If a failover operation is performed, the host application must recover and apply any updates that were not committed to the secondary VDisk.

You can optionally give the relationship a name. The name must be a unique relationship name across both clusters.

The relationship can optionally be assigned to a consistency group. A consistency group ensures that a number of relationships are managed so that, in the event of a disconnection of the relationships, the data in all relationships within the group is in a consistent state. This can be important in, for example, a database application where data files and log files are stored on separate VDisks and consequently are managed by separate relationships. In the event of a disaster, the primary and secondary sites might become disconnected. As the disconnection occurs and the relationships stop copying data from the primary to the secondary site, there is no assurance that updates to the two separate secondary VDisks will stop in a consistent manner if the relationships that are associated with the VDisks are not in a consistency group.

For proper database operation, it is important that updates to the log files and the database data are made in a consistent and orderly fashion. It is crucial in this example that the log file VDisk and the data VDisk at the secondary site are in a consistent state. This can be achieved by putting the relationships that are associated with these VDdisks into a consistency group. Both Metro Mirror and Global Mirror processing ensure that updates to both VDisks at the secondary site are stopped, leaving a consistent image based on the updates that occurred at the primary site.

If you specify a consistency group, both the group and the relationship must have been created using the same master cluster and the same auxiliary cluster. The relationship must not be a part of another consistency group. If the consistency group is empty, it acquires the type of the first relationship that is added to it. Therefore, each subsequent relationship that you add to the consistency group must have the same type.

If the consistency group is not empty, the consistency group and the relationship must be in the same state. If the consistency group is empty, it acquires the state of the first relationship that is added to it. If the state has an assigned copy direction, the direction of the consistency group and the relationship must match that direction.

If you do not specify a consistency group, a stand-alone relationship is created.

If you specify the -sync parameter, the master and auxiliary virtual disks contain identical data at the point when the relationship is created. You must ensure that the auxiliary is created to match the master and that no data movement occurs to either virtual disk before you issue the svctask mkrcrelationship command.

If you specify the -global parameter, a Global Mirror relationship is created. Otherwise, a Metro Mirror relationship is created instead.

An invocation example

svctask mkrcrelationship -master vdisk1 -aux vdisk2 -name rccopy1 
 -cluster 0000020063432AFD

The resulting output

RC Relationship, id [28], successfully created
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.