Oracle® Solaris Cluster Geographic Edition Data Replication Guide for MySQL

Exit Print View

Updated: July 2014, E41326-01
 
 

Replicating a MySQL Protection Group Configuration to a Partner Cluster

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

  • The protection group is defined on the remote cluster, not on the local cluster.

  • The MySQL database resources in the protection group on the remote cluster exist on the local cluster.

  • The application resource groups in the protection group on the remote cluster exist on the local cluster.

  • The Auto_start_on_new_cluster property of the resource groups is set to false. You can view this property by using the clresourcegroup show command, as follows:

    # clresourcegroup show -p auto_start_on_new_cluster apprg1

    Then, set the Auto_start_on_new_cluster property to false as follows:

    # clresourcegroup set -p Auto_start_on_new_cluster=false apprg1

    Setting this property to false prevents the Oracle Solaris Cluster resource group manager from automatically starting the resource groups in the protection group. Once the Geographic Edition software restarts and communicates with the remote cluster to ensure that the remote cluster is running and that the remote cluster is the secondary cluster for the resource group, the software does not automatically start the resource group on the primary cluster.

    Application resource groups should be online only on the primary cluster when the protection group is activated.

    1. Replicate the protection group configuration to the partner cluster.

      Use the following command to retrieve the configuration information of the protection group from the remote cluster and creates the protection group on the local cluster.

      # geopg get -s partnership-name mysql-pg

      In this syntax, the -s partnership-name option specifies the name of the partnership from which the protection group configuration information is retrieved. In addition, mysql-pg specifies the name of the protection group.


      Note -  Resynchronizing a protection group updates only entities that are related to Geographic Edition. To update Oracle Solaris Cluster resource groups, resource types, and resources, use the cluster export -t rg,rt,rs command to generate an XML cluster configuration file, modify the XML file for the expected configuration on the secondary cluster, and run the clresource create command with the –a option to apply the configuration updates.

      For more information, see How to Configure Oracle Solaris Cluster Software on All Nodes (XML) in Oracle Solaris Cluster Software Installation Guide and the cluster (1CL) and clresource (1CL) man pages.


Example 1-5  Replicating a MySQL Protection Group to a Partner Cluster

In the following example, paris-newyork-ps is a partnership between the cluster-parisand cluster-newyork clusters. The mysql-pg protection group is replicated to the cluster-newyork cluster. The configuration of the protection group is retrieved from the remote cluster cluster-paris and then validated by the data replication subsystem on the local cluster cluster-newyork.

# rlogin cluster-newyork -l root
phys-newyork-1# geopg get -s paris-newyork-ps mysql-pg

If the validation is successful, the configuration status is set to OK, and the protection group is created on the local cluster. This protection group contains a replicated component and an application group that are configured almost identically to the replicated component and application group on the remote cluster. If the validation fails, the protection group is not created on the local cluster. Fix the cause of the error, and replicate it again.