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).
>>- 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 -'
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.
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