Sun Cluster Geographic Edition System Administration Guide

Administering Hitachi TrueCopy Data Replication Device Groups

This section provides the following information about administering Hitachi TrueCopy data replication device groups:

For details about configuring a Hitachi TrueCopy data replication protection group, see How to Create and Configure a Hitachi TrueCopy Protection Group.

ProcedureHow to Add a Data Replication Device Group to a Hitachi TrueCopy Protection Group

Steps
  1. Log in to one of the cluster nodes.

    You must be assigned the Geo Management RBAC rights profile to complete this procedure. For more information about RBAC, see Sun Cluster Geographic Edition Software and RBAC.

  2. Create a data replication device group in the protection group.

    This command adds a device group to a protection group on the local cluster and propagates the new configuration to the partner cluster if the partner cluster contains a protection group of the same name.


    # geopg add-device-group -p property-settings [-p...] device-group-name protection-group-name
    
    -p property-settings

    Sets the properties of the data replication device group

    The Hitachi TrueCopy specific property that you can set is the following:

    • Fence_level – defines the fence level that is used by the device group. The fence level determines the level of consistency among the primary and secondary volumes for that device group.

      This property can take the values of data, status, never, or async. When you use a Fence_level of never or async, the application can continue to write to the primary cluster even after failure on the secondary cluster. However, when you set the Fence_level to data or status, the application on the primary cluster might fail because the secondary cluster is not available for reasons such as:

      • Data replication link failure

      • Secondary cluster and storage is down

      • Storage on the secondary cluster is down


    Caution – Caution –

    To avoid application failure on the primary cluster, specify a Fence_level of never or async. If you have special requirements to use a Fence_level of data or status, consult your Sun representative.


    For more information about application errors associated with different fence levels, see the Sun StorEdge SE 9900 V Series Command and Control Interface User and Reference Guide.

    The other properties you can set depend upon the type of data replication you are using. For details about these properties, see Appendix A, Standard Sun Cluster Geographic Edition Properties.

    device-group-name

    Specifies the name of the new data replication device group

    protection-group-name

    Specifies the name of the protection group which will contain the new data replication device group

    For information about the names and values that are supported by Sun Cluster Geographic Edition software, see Appendix B, Legal Names and Values of Sun Cluster Geographic Edition Entities.

    For more information about the geopg command, refer to the geopg(1M) man page.


    
    

Example 10–11 Adding a Data Replication Device Group to a Hitachi TrueCopy Protection Group

The following example illustrates how to create a Hitachi TrueCopy data replication device group in the tcpg protection group:


# geopg add-device-group -p Fence_level=data devgroup1 tcpg

Validations Made by the Data Replication Subsystem

When the Hitachi TrueCopy device group, configured as dev_group in the /etc/horcm.conf file, is added to a protection group, the data replication layer makes the following validations.

Hitachi TrueCopy Device Group Property 

Validation 

device-group-name

Checks that the specified Hitachi TrueCopy device group is configured on all of the cluster nodes that are specified in the Nodelist property.

Fence_level

If a pair is already established for this Hitachi TrueCopy device group, the data replication layer checks that the specified Fence_level matches the already established fence level.

If a pair is not yet established, for example if a pair is in the SMPL state, any Fence_level is accepted.

When a Hitachi TrueCopy device group is added to a protection group, a Sun Cluster resource is automatically created by this command. This resource monitors data replication. The name of the resource is r-tc-protection-group-name-device-group-name. This resource is placed in the corresponding Sun Cluster resource group, which is named rg-tc-protection-group-name.


Caution – Caution –

You must use caution before you modify these replication resources with Sun Cluster commands. These resources are for internal implementation purposes only.


How the State of the Hitachi TrueCopy Device Group is Validated

For validation purposes, Sun Cluster Geographic Edition gives each Hitachi TrueCopy device group a state according to the current state of its pair. This state is returned by the pairvolchk -g <DG> -ss command.

The remainder of this section describes the individual device group states and how these states are validated against the local role of the protection group.

Determining the State of an Individual Hitachi TrueCopy Device Group

An individual Hitachi TrueCopy device group can be in one of the following states:

The state of a particular device group is determined by using the value returned by the pairvolchk -g <DG> -ss command. The following table describes the device group state associated with the values returned by the pairvolchk command.

Table 10–1 Individual Hitachi TrueCopy Device Group States

Output of pairvolchk

Individual Device Group State 

11 = SMPL

SMPL

22 / 42 = PVOL_COPY

23 / 42 = PVOL_PAIR

26 / 46 = PVOL_PDUB

47 = PVOL_PFUL

48 = PVOL_PFUS

Regular Primary

24 / 44 = PVOL_PSUS

25 / 45 = PVOL_PSUE

For these return codes, determining the individual device group category requires that the horcmd process be active on the remote cluster so that the remote-pair-state for this device group can be obtained.

Regular Primary, if remote-cluster-state !=SSWS

or 

Takeover Secondary, if remote-cluster-state == SSWS

A state of SSWS can be seen when you use the pairdisplay -g <DG> -fc command.

32 / 52 = SVOL_COPY

33 / 53 = SVOL_PAIR

35 / 55 = SVOL_PSUE

36 / 56 = SVOL_PDUB

57 = SVOL_PFUL

58 = SVOL_PFUS

Regular Secondary

34 / 54 = SVOL_PSUS

Regular Secondary, if local-cluster-state !=SSWS

or 

Takeover Primary, if local-cluster-state == SSWS

A state of SSWS can be seen when you use the pairdisplay -g <DG> -fc command.

Determining the Aggregate Hitachi TrueCopy Device Group State

If a protection group contains only one Hitachi TrueCopy device group, then the aggregate device group state is the same as the individual device group state.

When a protection group contains multiple Hitachi TrueCopy device groups, the aggregate device group state is obtained as described in the following table.

Table 10–2 Conditions That Determine the Aggregate Device Group State

Condition 

Aggregate Device Group State 

All individual device group states are SMPL

SMPL

All individual device group states are either Regular Primary or SMPL

Regular Primary

All individual device group states are either Regular Secondary or SMPL

Regular Secondary

All individual device group states are either Takeover Primary or SMPL

Takeover Primary

All individual device group states are either Takeover Secondary or SMPL

Takeover Secondary

For any other combination of individual device group states, the aggregate device group state cannot be obtainable and is considered a pair-state validation failure.

Validating the Local Role of the Protection Group Against the Aggregate Device Group State

The local role of a Hitachi TrueCopy protection group is validated against the aggregate device group state as described in the following table.

Table 10–3 Validating the Aggregate Device Group State Against the Local Role of a Protection Group

Aggregate Device Group State 

Valid Local Protection Group Role 

SMPL

primary or secondary

Regular Primary

primary

Regular Secondary

secondary

Takeover Primary

primary

Takeover Secondary

secondary


Example 10–12 Validating the Aggregate Device Group State

The following example illustrates how the state of a Hitachi TrueCopy device group is validated against the role of the Hitachi TrueCopy protection group to which it belongs. First, the protection group is created as follows:


phys-paris-1# geopg create -s paris-newyork-ps -o primary -d truecopy tcpg

A device group, devgroup1, is added to the protection group, tcpg, as follows:


phys-paris-1# geopg add-device-group -p fence_level=async devgroup1 tcpg

The current state of a Hitachi TrueCopy device group, devgroup1, is given in the output of the pairdisplay command as follows:


phys-paris-1# pairdisplay -g devgroup1 
Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M 
devgroup1 pair1(L) (CL1-A , 0, 1) 12345   1..P-VOL PAIR ASYNC,54321  609   -
devgroup1 pair1(R) (CL1-C , 0, 20)54321 609..S-VOL PAIR ASYNC,-----   1    - 
devgroup1 pair2(L) (CL1-A , 0, 2) 12345   2..P-VOL PAIR ASYNC,54321  610   - 
devgroup1 pair2(R) (CL1-C , 0,21) 54321 610..S-VOL PAIR ASYNC,-----   2    -

The pairvolchk -g <DG> -ss command is run and returns a value of 23.


phys-paris-1# pairvolchk -g devgroup1 -ss
parivolchk : Volstat is P-VOL.[status = PAIR fence = ASYNC]
phys-paris-1# echo $?
23

The output of the pairvolchk command is 23, which corresponds in Table 10–1 to an individual device group state of Regular Primary. Because the protection group contains only one device group, the aggregate device group state is the same as the individual device group state. The device group state is valid because the local role of the protection group, specified by the -o option, is primary, as specified in Table 10–3.


ProcedureHow to Modify a Hitachi TrueCopy Data Replication Device Group

Steps
  1. Log in to one of the cluster nodes.

    You must be assigned the Geo Management RBAC rights profile to complete this procedure. For more information about RBAC, see Sun Cluster Geographic Edition Software and RBAC.

  2. Modify the device group.

    This command modifies the properties of a device group in a protection group on the local cluster. Then the command propagates the new configuration to the partner cluster if the partner cluster contains a protection group of the same name.


    # geopg modify-device-group -p property-settings [-p...] \
    TC-device-group-name protection-group-name 
    
    -p property-settings

    Sets the properties of the data replication device group

    For more information about the properties you can set, see Appendix A, Standard Sun Cluster Geographic Edition Properties.

    TC-device-group-name

    Specifies the name of the new data replication device group

    protection-group-name

    Specifies the name of the protection group that will contain the new data replication device group


Example 10–13 Modifying the Properties of a Hitachi TrueCopy Data Replication Device Group

The following example illustrates how to modify the properties of a data replication device group that is part of a Hitachi TrueCopy protection group:


# geopg modify-device-group -p fence_level=async tcdg tcpg

ProcedureHow to Delete a Data Replication Device Group From a Hitachi TrueCopy Protection Group

Before You Begin

You might delete a data replication device group from a protection group if you added a data replication device group to a protection group. Normally, after an application is configured to write to a set of disks, you would not change the disks.

Deleting a data replication device group does not stop replication or change the replication status of the data replication device group.

For information about deleting protection groups, refer to How to Delete a Hitachi TrueCopy Protection Group. For information about deleting application resource groups from a protection group, refer to How to Delete an Application Resource Group From a Hitachi TrueCopy Protection Group.

Steps
  1. Log in to one of the cluster nodes.

    You must be assigned the Geo Management RBAC rights profile to complete this procedure. For more information about RBAC, see Sun Cluster Geographic Edition Software and RBAC.

  2. Remove the device group.

    This command removes a device group from a protection group on the local cluster. Then the command propagates the new configuration to the partner cluster if the partner cluster contains a protection group of the same name.


    # geopg remove-device-group device-group-name protection-group-name
    
    device-group-name

    Specifies the name of the data replication device group

    protection-group-name

    Specifies the name of the protection group

    When a device group is deleted from a Hitachi TrueCopy protection group, the corresponding Sun Cluster resource, r-tc-protection-group-name-device-group-name, is removed from the replication resource group. As a result, the deleted device group is no longer monitored. The resource group is removed when the protection group is deleted.


Example 10–14 Deleting a Replication Device Group From a Hitachi TrueCopy Protection Group

The following example illustrates how to remove a Hitachi TrueCopy data replication device group:


# geopg remove-device-group tcdg tcpg