Sun Cluster Geographic Edition System Administration Guide

Chapter 10 Administering Hitachi TrueCopy Protection Groups

This chapter contains the procedures for configuring and administering data replication with Hitachi TrueCopy software. The chapter contains the following sections:

Strategies for Creating Hitachi TrueCopy Protection Groups

Before you begin creating protection groups, consider which of the following strategies is best for you:

The following sections describe the steps to take for each strategy.

Creating a Protection Group While the Application is Offline

The steps to take to create a protection group while the application resource groups is offline follow:

Creating a Protection Group While the Application is Online

To add an existing application resource group to a new protection group without taking the application offline, complete the following steps on the cluster where the application resource group is online.

Complete the following steps on the other cluster.


Example 10–1 Example of Creating a Hitachi TrueCopy Protection Group While the Application Remains Online

This example describes how to create a protection group without taking the application offline.

In this example, the apprg1 resource group is online on the cluster-paris cluster.

  1. Create the protection group on cluster-paris.


    phys-paris-1# geopg create -d tc -p Nodelist=phys-paris-1,phys-paris-2 -o Primary \
    -s paris-newyork-ps tcpg
    Protection group "tcpg" has been successfully created
  2. Add the device group, tcdg, to the protection group.


    phys-paris-1# geopg add-device-group -p fence_level=async tcdg tcpg
  3. Activate the protection group locally.


    phys-paris-1# geopg start-e local tcpg
    Processing operation.... this may take a while....
    Protection group "tcpg" successfully started.
  4. Add an application resource group that is already online to the protection group.


    phys-paris-1# geopg add-resource-group apprg1 tcpg
    Following resource groups were successfully inserted:
    			"apprg1"

    Verify that the application resource group was added successfully.


    phys-paris-1# geoadm status
    Cluster: cluster-paris
    
       Partnership "paris-newyork-ps"    : OK
          Partner clusters               : newyork
          Synchronization                : OK
    
          Heartbeat "hb_cluster-paris~cluster-newyork" monitoring \
    "paris-newyork-ps" OK
             Plug-in "ping-plugin"       : Inactive
             Plug-in "icrm_plugin"       : OK
             Plug-in "tcp_udp_plugin"    : OK
    
       Protection group "tcpg"           : Degraded
          Partnership                    : paris-newyork-ps
          Synchronization                : OK
    
          Cluster cluster-paris          : Degraded
             Role                        : Primary
             Configuration               : OK
             Data replication            : Degraded
             Resource groups             : OK
    
          Cluster cluster-newyork        : Unknown
             Role                        : Unknown
             Configuration               : Unknown
             Data Replication            : Unknown
             Resource Groups             : Unknown
  5. On one node of the partner cluster, retrieve the protection group as follows:


    phys-newyork-1# geopg get -s paris-newyork-ps tcpg
    Protection group "tcpg" has been successfully created.
  6. Activate the protection group locally on the partner cluster.


    phys-newyork-1# geopg start-e local tcpg
    Processing operation.... this may take a while....
    Protection group "tcpg" successfully started.
  7. Verify that the protection group was successfully created an activated.

    Running the geoadm status command on cluster-parisproduces the following output:


    phys-paris-1# geoadm status
    Cluster: cluster-paris
    
       Partnership "paris-newyork-ps"        : OK
          Partner clusters                   : newyork
          Synchronization                    : OK
    
          Heartbeat "hb_cluster-paris~cluster-newyork" monitoring \
    "paris-newyork-ps": OK 			
             Plug-in "ping-plugin"           : Inactive
             Plug-in "icrm_plugin"           : OK
             Plug-in "tcp_udp_plugin"        : OK
    
       Protection group "tcpg"               : Degraded
          Partnership                        : paris-newyork-ps
          Synchronization                    : OK
    
          Cluster cluster-paris              : Degraded
             Role                            : Primary
             Configuration                   : OK
             Data replication                : Degraded
             Resource groups                 : OK
    
          Cluster cluster-newyork            : Degraded
             Role                            : Secondary
             Configuration                   : OK
             Data Replication                : Degraded
             Resource Groups                 : OK

Creating, Modifying, Validating, and Deleting a Hitachi TrueCopy Protection Group

This section contains procedures for the following tasks:


Note –

You can create protection groups that are not configured to use data replication. To create a protection group that does not use a data replication subsystem, omit the -d data-replication-type option when you use the geopg command. The geoadm status command shows a state for these protection groups of Degraded.

For more information, see Creating a Protection Group That Does Not Require Data Replication.


ProcedureHow to Create and Configure a Hitachi TrueCopy Protection Group

Before You Begin

Before you create a protection group, ensure that the following conditions are met:


Note –

Protection group names are unique in the global Sun Cluster Geographic Edition namespace. You cannot use the same protection group name in two partnerships on the same system.


You can also replicate the existing configuration of a protection group from a remote cluster to the local cluster. For more information, see Replicating the Hitachi TrueCopy Protection Group Configuration to a Partner Cluster.

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 new protection group by using the geopg create command.

    This command creates a protection group on all nodes of the local cluster.


    # geopg create -s partnership-name -o local-role -d truecopy [-p property-settings [-p...]] \
    protection-group-name
    
    -s partnership-name

    Specifies the name of the partnership

    -o local-role

    Specifies the role of this protection group on the local cluster as either primary or secondary

    -d truecopy

    Specifies that the protection group data is replicated by Hitachi TrueCopy

    -p property-setting

    Sets the properties of the protection group

    The properties you can set are the following:

    • Description – Describes the protection group

    • Timeout – Specifies the timeout period for the protection group in seconds

    • Nodelist – Lists the host names of the machines that can be primary for the replication subsystem

    • Cluster_dgs – Lists the device groups where the data is written

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

    protection-group-name

    Specifies the name of the protection 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–2 Creating and Configuring a Hitachi TrueCopy Protection Group

The following example illustrates how to create a Hitachi TrueCopy protection group on cluster-paris, which is set as the primary cluster:


# geopg create -s paris-newyork-ps -o primary -d truecopy \
-p Nodelist=phys-paris-1,phys-paris-2 tcpg


Example 10–3 Creating a Hitachi TrueCopy Protection Group for Application Resource Groups That Are Online

The following example illustrates how to create a Hitachi TrueCopy protection group, tcpg, for an application resource group, resourcegroup1, that is currently online on cluster-newyork.

  1. Create the protection group without the application resource group.


    # geopg create -s paris-newyork-ps -o primary -d truecopy \
     -p nodelist=phys-paris-1,phys-paris-2 tcpg
  2. Activate the protection group.


    # geopg start -e local tcpg
  3. Add the application resource group.


    # geopg add-resource-group resourcegroup1 tcpg

How the Data Replication Subsystem Validates the Device Group

Before creating the protection group, the data replication layer validates that the horcmd daemon is running.

The data replication layer validates that the horcmd daemon is running on at least one of the nodes given in the Nodelist property. For more information about the horcmd daemon, see the Sun StorEdge SE 9900 V Series Command and Control Interface User and Reference Guide.

If the Cluster_dgs property is specified, then the data replication layer verifies that the device group specified is a valid Sun Cluster device group. The data replication layer also verifies that the device group is of a valid type.


Note –

The device groups specified in the Cluster_dgs property must be written to only by applications that belong to the protection group. This property must not specify device groups that receive information from applications outside of the protection group.


A Sun Cluster resource group is automatically created when the protection group is created.

This resource in this resource group monitors data replication. The name of the Hitachi TrueCopy data replication resource group is rg-tc-protection-group-name.


Caution – Caution –

These automatically created replication resource groups are for Sun Cluster Geographic Edition internal implementation purposes only. Use caution when you modify these resource groups by using Sun Cluster commands.


ProcedureHow to Modify a Hitachi TrueCopy Protection Group

Before You Begin

Before modifying the configuration of your protection group, ensure that the protection group you want to modify exists locally.

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 configuration of the protection group.

    This command modifies the properties of a protection group on all nodes of the local cluster. If the partner cluster contains a protection group of the same name, this command also propagates the new configuration information to the partner cluster.


    # geopg set-prop -p property-settings [-p...] \
    protection-group-name 
    
    -p property-setting

    Sets the properties of the protection group.

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

    protection-group-name

    Specifies the name of the protection 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–4 Modifying the Configuration of a Protection Group

The following example illustrates how to modify the Timeout property of the protection group that was created in Example 10–2:


# geopg set-prop -p Timeout=400 tcpg

ProcedureHow to Validate a Hitachi TrueCopy Protection Group

Before You Begin

When the geoadm status output displays that the Configuration status of a protection group is Error, you can validate the configuration by using the geopg validate command. This command checks the current state of the protection group and its entities.

If the protection group and its entities are valid, then the Configuration status of the protection groups is set to OK. If the geopg validate command finds error in the configuration files, then the command displays a message about the error and the configuration remains in the error state. In such a case, you can fix the error in the configuration, and issue thegeopg validate command again.

Before validating the configuration of a protection group, ensure that the protection group you want to validate exists locally and that the common agent container is online on all nodes of both clusters in the partnership.

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. Validate the protection group's configuration.

    This command validates the configuration of the protection group on the local cluster only. To validate the protection group configuration on the partner cluster, issue the command again on the partner cluster.


    # geopg validate protection-group-name 
    
    protection-group-name

    Specifies a unique name that identifies a single protection group


Example 10–5 Validating the Configuration of a Protection Group

The following example illustrates how to validate a protection group.


# geopg validate tcpg

Validations Made by the Data Replication Subsystem During Protection Group Validation

During protection group validation, the Hitachi TrueCopy data replication layer makes the following validations:

ProcedureHow to Delete a Hitachi TrueCopy Protection Group

Before You Begin

If you want to delete the protection group everywhere, you must run the geopg delete command on each cluster where the protection group exists.

Before deleting a protection group, ensure that the following conditions are met:


Note –

You must remove the application resource groups from the protection group in order to keep the application resource groups online while deleting the protection group. See Example 10–7 and Example 10–10 for examples of this procedure.


Steps
  1. Log in to a nodes on the primary cluster.

    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. Delete the protection group.

    This command deletes the configuration of the protection group from the local cluster. The command also removes the replication resource group for each Hitachi TrueCopy device group in the protection group. This command does not alter the pair state of the Hitachi TrueCopy device group.


    # geopg delete protection-group-name 
    
    protection-group-name

    Specifies the name of the protection group

  3. To also delete the protection group on the secondary cluster, repeat step 1 and step 2 on cluster-newyork.


Example 10–6 Deleting a Protection Group

The following example illustrates how to delete a protection group from both partner clusters.

The cluster-paris is the primary cluster. For a reminder of the sample cluster configuration, see Figure 2–1.


# rlogin cluster-paris -l root
cluster-paris# geopg delete tcpg
# rlogin cluster-newyork -l root
cluster-newyork# geopg delete tcpg


Example 10–7 Deleting a Hitachi TrueCopyProtection Group While Keeping Application Resource Groups Online

The following example illustrates how to keep two application resource groups, apprg1 and apprg2, online while deleting their protection group, tcpg. Remove the application resource groups from the protection group, then delete the protection group.


# geopg remove-resource-group apprg1,apprg2 tcpg
# geopg stop -e global tcpg 
# geopg delete tcpg

Creating a Protection Group That Does Not Require Data Replication

Some of the protection groups will not require data replication. If you are using the Sun Cluster Geographic Edition software to manage only resource groups and to handle data replication differently, you can create protection groups that do not replicate data. The geoadm status command shows a state for these protection groups of Degraded. This section describes how to configure your protection group to not use data replication.

For information about how to create a Hitachi TrueCopy protection group that uses data replication, see How to Create and Configure a Hitachi TrueCopy Protection Group.


Note –

You cannot add device groups to a protection group that does not use data replication.


ProcedureHow to Create a Protection Group That Does Not Require Data Replication

Before You Begin

Before you create a protection group, ensure that the following conditions are met:


Note –

Protection group names are unique in the global Sun Cluster Geographic Edition namespace. You cannot use the same protection group name in two partnerships on the same system.


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 new protection group by using the geopg create command.

    This command creates a protection group on all nodes of the local cluster.


    # geopg create -s partnership-name -o local-role \
    [-p property-settings [-p...]] \
    protection-group-name
    
    -s partnership-name

    Specifies the name of the partnership

    -o local-role

    Specifies the role of this protection group on the local cluster as either Primary or Secondary

    -p property-setting

    Sets the properties of the protection group

    The properties you can set are the following:

    • Description – describes the protection group

    • Timeout – specifies the timeout period for the protection group in seconds

    • Nodelist – lists the host names of the machines that can be primary for the replication subsystem

    • Cluster_dgs – lists the device groups where the data is written

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

    protection-group-name

    Specifies the name of the protection 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–8 Creating and Configuring a Protection Group That Is Not Replicated

The following example illustrates how to create an protection group that is not replicated:


# geopg create -s paris-newyork-ps -o primary example-pg

Next Steps

See Administering Hitachi TrueCopy Application Resource Groups for information on adding resource groups to a protection group.

Administering Hitachi TrueCopy Application Resource Groups

To be highly available, an application must be managed as a resource in an application resource group.

All of the entities you configure for the application resource group on the primary cluster, such as application resources, installation, application configuration files, and resource groups must be replicated to the secondary cluster. The resource group names must be identical on both clusters. Also, the data that the application resource uses must be replicated to the secondary cluster.

This section contains information about the following tasks:

ProcedureHow to Add an Application Resource Group to a Hitachi TrueCopy Protection Group

Before You Begin

You can add an existing resource group to the list of application resource groups for a protection group. Before you add an application resource group to a protection group, ensure that the following conditions are met:

The protection group can be activated or deactivated and the resource group can be either Online or Offline.

If the resource group is Offline and the protection group is Active after the configuration of the protection group has changed, the protection group's local state becomes Degraded.

If the resource group to add is Online and the protection group is deactivated, the request is rejected. You must activate the protection group before adding an activate resource 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. Add an application resource group to the protection group.

    This command adds an application resource group to a protection group on the local cluster. Then the command propagates the new configuration information to the partner cluster if the partner cluster contains a protection group of the same name.


    # geopg add-resource-group resource-group-list protection-group
    
    resource-group-list

    Specifies the name of the application resource group

    You can specify more than one resource group in a comma-separated list.

    protection-group

    Specifies the name of the protection 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.

    If the add operation is unsuccessful on the local cluster, the configuration of the protection group is not modified. Otherwise, the Configuration status is set to OK on the local cluster.

    If the Configuration status is OK on the local cluster, but the add operation is unsuccessful on the partner cluster, the Configuration status is set to Error on the partner cluster.

    After the application resource group is added to the protection group, the application resource group is managed as an entity of the protection group. Then the application resource group is affected by protection group operations such as start, stop, switchover, and takeover.


Example 10–9 Adding an Application Resource Group to a Protection Group

The following example illustrates how to add two application resource groups, apprg1 and apprg2, to tcpg:


# geopg add-resource-group apprg1,apprg2 tcpg

ProcedureHow to Delete an Application Resource Group From a Hitachi TrueCopy Protection Group

Before You Begin

You can remove an existing application resource group from a protection group without altering the application resource group's state or contents.

Before you remove an application resource group from a protection group, ensure that the following conditions are met:

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 application resource group from the protection group.

    This command removes an application resource group from the protection group on the local cluster. If the partner cluster contains a protection group of the same name, then the command removes the application resource group from the protection group on the partner cluster.


    # geopg remove-resource-group resource-group-list protection-group
    
    resource-group-list

    Specifies the name of the application resource group

    You can specify more than one resource group in a comma-separated list.

    protection-group

    Specifies the name of the protection group

    If the remove operation is unsuccessful on the local cluster, the configuration of the protection group is not modified. Otherwise, the Configuration status is set to OK on the local cluster.

    If the Configuration status is OK on the local cluster, but the remove operation is unsuccessful on the partner cluster, the Configuration status is set to Error on the partner cluster.


Example 10–10 Deleting an Application Resource Group From a Protection Group

The following example illustrates how to remove two application resource groups, apprg1 and apprg2, from tcpg:


# geopg remove-resource-group apprg1,apprg2 tcpg

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

Replicating the Hitachi TrueCopy Protection Group Configuration to a Partner Cluster

After you have configured data replication, resource groups, and resources on your primary and secondary clusters, you can replicate the configuration of the protection group to the secondary cluster.

ProcedureHow to Replicate the Hitachi TrueCopy Protection Group Configuration to a Partner Cluster

Before You Begin

Before you replicate the configuration of a Hitachi TrueCopy protection group to a partner cluster, ensure that the following conditions are met:

Steps
  1. Log in to phys-newyork-1.

    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.

    phys-newyork-1 is the only node on the secondary cluster. For a reminder of which node is phys-newyork-1 , see Figure 2–1.

  2. Replicate the protection group configuration to the partner cluster by using the geopg get command.

    This command retrieves the configuration information of the protection group from the remote cluster and creates the protection group on the local cluster.


    phys-newyork-1# geopg get -s partnership-name [protection-group]
    -s partnership-name

    Specifies the name of the partnership from which the protection group configuration information should be retrieved and the name of the partnership where the protection will be created locally.

    protection-group

    Specifies the name of the protection group

    If no protection group is specified, then all protection groups that exist in the specified partnership on the remote partner are created on the local cluster.


    Note –

    The geopg get command replicates Sun Cluster Geographic Edition related entities. For information about how to replicate Sun Cluster entities, see Replicating and Upgrading Configuration Data for Resource Groups, Resource Types, and Resources in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.



Example 10–15 Replicating the Hitachi TrueCopy Protection Group to a Partner Cluster

The following example illustrates how to replicate the configuration of tcpg from cluster-paris to cluster-newyork:


# rlogin phys-newyork-1 -l root
phys-newyork-1# geopg get -s paris-newyork-ps tcpg

Activating Hitachi TrueCopy Protection Group

When you activate a protection group, the protection group assumes the role that you assigned to it during configuration. You can activate a protection group in the following ways:

Activating a Hitachi TrueCopy protection group on a cluster has the following impact on the data replication layer:

Application handling proceeds only after data replication has been started successfully.

Activating a protection group has the following impact on the application layer:

The Hitachi TrueCopy command used to start data replication depends on the following factors:

The following table describes the Hitachi TrueCopy command used to start data replication for each of the possible combinations of factors. In the commands, dg is the device group name and fl is the fence level configured for the device group.

Table 10–4 Commands Used to Start Hitachi TrueCopy Data Replication

Aggregate Device Group State 

Valid Local Protection Group Role 

Hitachi TrueCopyStart Command 

SMPL

primary or secondary

paircreate -vl -g dg -f fl

paircreate -vr -g dg -f fl

 

Both commands require that the horcmd process is up on the remote cluster.

Regular Primary

primary

If the local state code is 22, 23, 25, 26, 29, 42, 43, 45, 46, or 47, no command is issued because data is already being replicated. 

If the local state code is 24, 44, or 48, then the following command is issued: pairresync -g dg [-l]

If the local state code is 11, then the following command is issued: paircreate -vl -g dg -f fl

Both commands require that the horcmd process is up on the remote cluster.

Regular Secondary

secondary

If the local state code is 32, 33, 35, 36, 39, 52, 53, 55, 56, or 57, no command is issued because data is already being replicated. 

If the local state code is 34, 54, or 58, then the following command is issued: pairresync -g dg

If the local state code is 11, the following command is issued: paircreate -vr -g dg -f fl

Both commands require that the horcmd process is up on the remote cluster.

Takeover Primary

primary

If the local state code is 34 or 54, the following command is issued: pairresync -swaps -g

If the local state code is 11, then the following command is issued: paircreate -vl -g dg -f fl

The paircreate command requires that the horcmd process is up on the remote cluster.

Takeover Secondary

secondary

If the local state code is 24, 44, 25, or 45, the following command is issued: pairresync -swapp -g dg

If the local state code is 11, the following command is issued: paircreate -vr -g dg -f fl

Both commands require that the horcmd process is up on the remote cluster.

ProcedureHow to Activate 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. Activate the protection group.

    When you activate a protection group, its application resource groups are also brought online.


    # geopg start -e scope [-n] protection-group-name 
    
    -e scope

    Specifies the scope of the command

    If the scope is Local, then the command operates on the local cluster only. If the scope is Global, the command operates on both clusters that deploy the protection group.


    Note –

    The property values, such as Global and Local, are not case sensitive.


    -n

    Prevents the start of data replication at protection group startup

    If you omit this option, the data replication subsystem starts at the same time as the protection group.

    protection-group-name

    Specifies the name of the protection group

    The geopg start command uses the scswitch -Z -g resource-groups command to bring resource groups and resources online. For more information about using this command, see the scswitch(1M) man page.


Example 10–16 How the Sun Cluster Geographic Edition Software Issues the Command to Start Replication

The following example illustrates how the Sun Cluster Geographic Edition determines the Hitachi TrueCopy command used to start data replication.

First, the Hitachi TrueCopy protection group is created.


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

A device group, devgroup1, is added to the protection group.


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

The current state of a Hitachi TrueCopydevice 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..SMPL ----  ----, ----- ----   - 
devgroup1 pair1(R) (CL1-C , 0, 20)54321 609..SMPL ----  ----, ----- ----   - 
devgroup1 pair2(L) (CL1-A , 0, 2) 12345   2..SMPL ----  ----, ----- ----   - 
devgroup1 pair2(R) (CL1-C , 0,21) 54321 610..SMPL ----  ----, ----- ----   -

The aggregate device group state is SMPL.

Next, the protection group, tcpg, is activated by using the geopg start command.


phys-paris-1# geopg start -e local tcpg

The Sun Cluster Geographic Edition software executes the paircreate -g devgroup1 -vl -f async command at the data replication level. If the command is successful, the state of 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 COPY ASYNC,54321  609   - 
devgroup1 pair1(R) (CL1-C , 0, 20)54321 609..S-VOL COPY ASYNC,-----   1    - 
devgroup1 pair2(L) (CL1-A , 0, 2) 12345   2..P-VOL COPY ASYNC,54321  610   - 
devgroup1 pair2(R) (CL1-C , 0,21) 54321 610..S-VOL COPY ASYNC,-----   2    -


Example 10–17 Activating a Hitachi TrueCopy Protection Group Globally

The following example illustrates how to activate a protection group globally:


# geopg start -e global tcpg

The protection group, tcpg, is activated on both clusters where the protection group is configured.



Example 10–18 Activating a Hitachi TrueCopy Protection Group Locally

The following example illustrates how to activate a protection group on a local cluster only. This local cluster might be a primary cluster or a secondary cluster, depending on the cluster's role.


# geopg start -e local tcpg

Deactivating a Hitachi TrueCopy Protection Group

You can deactivate a protection group in the following ways:

Deactivating a Hitachi TrueCopy protection group on a cluster has the following impact on the data replication layer:

Deactivating a protection group has the following impact on the application layer:

The Hitachi TrueCopy command used to stop data replication depends on the following factors:

The following table describes the Hitachi TrueCopy command used to stop data replication for each of the possible combinations of factors. In the commands, dg is the device group name.

Table 10–5 Commands Used to Stop Hitachi TrueCopy Data Replication

Aggregate Device Group State 

Valid Local Protection Group Role 

Hitachi TrueCopyStop Command 

SMPL

primary or secondary

No command is issued because no data is being replicated. 

Regular Primary

primary

If the local state code is 22, 23, 26, 29, 42, 43, 46, or 47, then the following command is issued: pairsplit -g dg [-l]

If the local state code is 11, 24, 25, 44, 45, or 48, then no command is issue because no data is being replicated. 

Regular Secondary

secondary

If the local state code is 32, 33, 35, 36, 39, 52, 53, 55, 56, or 57, the following command is issued: pairsplit -g dg

If the local state code is 33 or 53 and the remote state is PSUE, no command is issued to stop replication.

If the local state code is 11, 34, 54, or 58, then no command is issue because no data is being replicated. 

Takeover Primary

primary

No command is issued because no data is being replicated. 

Takeover Secondary

secondary

No command is issued because no data is being replicated. 

ProcedureHow to Deactivate a Hitachi TrueCopy Protection Group

Steps
  1. Log in to a cluster node.

    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. Deactivate the protection group.

    When you deactivate a protection group, its application resource groups are also taken offline.


    # geopg stop -e scope [-D] protection-group-name
    
    -e scope

    Specifies the scope of the command

    If the scope is Local, then the command operates on the local cluster only. If the scope is Global, the command operates on both clusters where the protection group is deployed.


    Note –

    The property values, such as Global and Local, are not case sensitive.


    -D

    Specifies that only data replication should be stopped while leaving the protection group online.

    If you omit this option, the data replication subsystem and the protection group are both stopped.

    protection-group-name

    Specifies the name of the protection group.


Example 10–19 How the Sun Cluster Geographic Edition Software Issues the Command to Stop Replication

The following example illustrates how the Sun Cluster Geographic Edition software determines the Hitachi TrueCopy command used to stop data replication.

The current state of the 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    -

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


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

The Sun Cluster Geographic Edition software executes the pairvolchk -g <DG> -ss command at the data replication level, which returns a value of 43.


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

Next, the protection group, tcpg, is deactivated by using the geopg stop command.


phys-paris-1# geopg stop -s local tcpg

The Sun Cluster Geographic Edition software executes the pairsplit -g devgroup1 command at the data replication level.

If the command is successful, the state of 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 PSUS ASYNC,54321  609   - 
devgroup1 pair1(R) (CL1-C , 0, 20)54321 609..S-VOL SSUS ASYNC,-----   1    - 
devgroup1 pair2(L) (CL1-A , 0, 2) 12345   2..P-VOL PSUS ASYNC,54321  610   - 
devgroup1 pair2(R) (CL1-C , 0,21) 54321 610..S-VOL SSUS ASYNC,-----   2    -


Example 10–20 Deactivating a Protection Group on All Clusters

The following example illustrates how to deactivate a protection group on all clusters:


# geopg stop -e global tcpg


Example 10–21 Deactivating a Protection Group on a Local Cluster

The following example illustrates how to deactivate a protection group on the local cluster:


# geopg stop -e local tcpg


Example 10–22 Stopping Data Replication While Leaving the Protection Group Online

The following example illustrates how to stop only data replication on a local cluster:


# geopg stop -e local -D tcpg

If the administrator decides later to deactivate both the protection group and its underlying data replication subsystem, the administrator can reissue the command without the -D option:


# geopg stop -e local tcpg


Example 10–23 Deactivating a Hitachi TrueCopy Protection Group While Keeping Application Resource Groups Online

The following example illustrates how to keep two application resource groups, apprg1 and apprg2, online while deactivating their protection group, tcpg on both clusters.

  1. Remove the application resource groups from the protection group:


    # geopg remove-resource-group apprg1,apprg2 tcpg
  2. Deactivate the protection group:


    # geopg stop -e global tcpg

Resynchronizing a Hitachi TrueCopy Protection Group

You can resynchronize the configuration information of the local protection group with the configuration information retrieved from the partner cluster. You need to resynchronize a protection group when its Synchronization status in the output of the geoadm status command is Error.

For example, you might need to resynchronize protection groups after booting the cluster. For more information, see Booting a Cluster.

Resynchronizing a protection group updates only entities that are related to Sun Cluster Geographic Edition software. For information about how to update Sun Cluster entities, see Replicating and Upgrading Configuration Data for Resource Groups, Resource Types, and Resources in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

ProcedureHow to Resynchronize a Protection Group

Before You Begin

The protection group must be deactivated on the cluster where you are running the geopg update command. For information on deactivating a protection group, see Deactivating 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. Resynchronize the protection group.


    # geopg update protection-group-name
    
    protection-group-name

    Specifies the name of the protection group


Example 10–24 Resynchronizing a Protection Group

The following example illustrates how to resynchronize a protection group:


# geopg update tcpg

Checking the Runtime Status of Hitachi TrueCopy Data Replication

You can obtain an overall view of the status of replication, as well as a more detailed runtime status of the Hitachi TrueCopy replication resource groups. The following sections describe the procedures for checking each status.

Printing a Hitachi TrueCopy Runtime Status Overview

The status of each Hitachi TrueCopy data replication resource indicates the status of replication on a particular device group. The status of all the resources under a protection group are aggregated in the replication status. This replication status is the second component of the protection group state. For more information about the states of protection groups, refer to Monitoring the Runtime Status of the Sun Cluster Geographic Edition Software.

To view the overall status of replication, look at the protection group state as described in the following procedure.

ProcedureHow to Check the Overall Runtime Status of Replication

Steps
  1. Access a node of the cluster where the protection group has been defined. .

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

  2. Check the runtime status of replication.


    # geoadm status

    Refer to the Protection Group section of the output for replication information. The information that is printed by this command includes the following:

    • Whether the local cluster is enabled for partnership participation

    • Whether the local cluster is involved in a partnership

    • Status of the heartbeat configuration

    • Status of the defined protection groups

    • Status of current transactions

  3. Check the runtime status of data replication for each Hitachi TrueCopy device group.


    # scstat -g

    Refer to the Status and Status Message fields given for the data replication device group you want to check.

See Also

For more information about these fields, see Table 10–6.

Printing a Detailed Hitachi TrueCopy Runtime Status

The Sun Cluster Geographic Edition software internally creates and maintains one replication resource group for each protection group. The name of the replication resource group has the following format:


rg-tc_truecopy-protection-group-name

If you add a Hitachi TrueCopy device group to a protection group, Sun Cluster Geographic Edition software creates a resource for each device group. This resource monitors the status of replication for its device group. The name of each resource has the following format:


r-tc-truecopy-protection-group-name-truecopy-devicegroup-name

You can monitor the status of replication of this device group by looking at the Status and Status Message of this resource. Resource status and the status message are shown by the scstat -g command.

The following table describes the Status and Status Message values that are returned by the scstat -g command when the State of the Hitachi TrueCopy replication resource group is Online.

Table 10–6 State and Status Messages of an Online Hitachi TrueCopy Replication Resource Group

Status 

Status Message 

Online 

P-Vol/S-Vol:PAIR 

Online 

P-Vol/S-Vol:PAIR:Remote horcmd not reachable 

Online 

P-Vol/S-Vol:PFUL 

Online 

P-Vol/S-Vol:PFUL:Remote horcmd not reachable 

Degraded 

SMPL:SMPL 

Degraded 

SMPL:SMPL:Remote horcmd not reachable 

Degraded 

P-Vol/S-Vol:COPY 

Degraded 

P-Vol/S-Vol:COPY:Remote horcmd not reachable 

Degraded 

P-Vol/S-Vol:PSUS 

Degraded 

P-Vol/S-Vol:PSUS:Remote horcmd not reachable 

Degraded 

P-Vol/S-Vol:PFUS 

Degraded 

P-Vol/S-Vol:PFUS:Remote horcmd not reachable 

Faulted 

P-Vol/S-Vol:PDFUB 

Faulted 

P-Vol/S-Vol:PDUB:Remote horcmd not reachable 

Faulted 

P-Vol/S-Vol:PSUE 

Faulted 

P-Vol/S-Vol:PSUE:Remote horcmd not reachable 

Degraded 

S-Vol:SSWS:Takeover Volumes 

Faulted 

P-Vol/S-Vol:Suspicious role configuration. Actual Role=x, Config Role=y 

For more details about these values, refer to the Hitachi TrueCopy documentation.

For more information about the scstat command, see the scstat(1M) man page.