Sun Cluster Geographic Edition Data Replication Guide for Hitachi TrueCopy and Universal Replicator

Using Consistency Group IDs to Ensure Data Consistency

Along with journal volumes, consistency group IDs (CTGIDs) ensure data consistency even if the storage for an application data service includes devices in multiple Hitachi device groups. A CTGID is an integer that is assigned to one or more Hitachi device groups. It designates those devices that must be maintained in a state of replication consistent with each other. Consistency is maintained among all devices with the same CTGID whether the devices are members of a single Hitachi device group or several Hitachi device groups. For example, if Hitachi Universal Replicator stops replication on the devices of one device group that is assigned the CTGID of 5, it stops replication on all other devices in device groups with the CTGID of 5.

To ensure data consistency, an exact correspondence must therefore exist between the device groups that are used by a single application data service and a CTGID. All device groups that are used by a single data service must have the same unique CTGID. No device group can have that CTGID unless it is used by the data service.

To ensure this correspondence, the Sun Cluster Geographic Edition 3.2 11/09 software allows the administrator to set a CTGID property on each protection group. The device groups that are added to the protection group must all have the same CTGID as the protection group. If other device groups are assigned the same CTGID as the device groups in the protection group, the Sun Cluster Geographic Edition software generates an error. For example, if the protection group app1-pg has been assigned the CTGID of 5, all device groups included in app1-pg must have the CTGID of 5. Moreover, all CTGIDs of device groups that are included in app1-pg must have the CTGID of 5.

You are not required to set a CTGID on a protection group. The Hitachi storage software will automatically assign a unique CTGID to an asynchronously replicated device group when it is initialized. Thereafter, the pairs in that device group will be maintained in a state of consistency with each other. Thus, if an application data service in a protection group uses storage in just one asynchronously replicated Hitachi device group, you can let the Hitachi storage array assign the device group's CTGID. You do not have to also set the CTGID of the protection group.

Similarly, if you do not need data consistency, or if your application does not write asynchronously to your Hitachi device groups, then setting the CTGID on the protection group has little use. However, if you do not assign a CTGID to a protection group, any later configuration changes to the device group or to the protection group might lead to conflicts. Assignment of a CTGID to a protection group provides the most flexibility for later changes and the most assurance of device group consistency.

ProcedureConfiguring Consistency Group IDs for Hitachi Universal Replicator Device Groups in Asynchronous Mode

You can assign a consistency group ID (CTGID) to a protection group by setting the property ctgid=consistency-group-ID as an option to the geopg create command. You can assign CTGID values to device groups in one of two ways:

The following procedure demonstrates these two methods of setting the CTGID for the devices that are used by an application data service. The procedure configures a protection group named app1-pg with a CTGID of 5. This protection group contains the app1-rg resource group and the Hitachi Universal Replicator devgroup1 device group, which uses the async fence level.

Before You Begin
  1. On the primary cluster, create the Sun Cluster Geographic Edition protection group with a specified CTGID, and add the resource group.

    phys-paris-1# geopg create -s paris-newyork-ps -o primary -d truecopy -p ctgid=5 \
    -p nodelist=phys-paris-1,phys-paris-2 app1-pg

    phys-paris-1# geopg add-resource-group app1-rg app1-pg
  2. Add device groups to the protection group by using one of the following methods:

    • Add device groups that have been configured in the /etc/horcm.conf file but have not been initialized by using the paircreate command.

      phys-paris-1# geopg add-device-group -p fence_level=async devgroup1 app1-pg
    • Assign CTGIDs to device groups when they are initialized by using the Hitachi paircreate command, and add the device groups to the protection group that has the same value for the CTGID property.

      In the following example, a device group is initialized with the CTGID of 5 and then added to the app1-pg protection group:

      phys-paris-1# paircreate -g devgroup1 -vl -f async 5

      phys-paris-1# geopg add-device-group -p fence_level=async devgroup1 app1-pg
  3. Start the protection group.

    phys-paris-1# geopg start -e local app1-pg

    Uninitialized device groups, if any, are initialized and assigned the CTGID of 5.