Go to main content

Oracle® Solaris Cluster Data Replication Guide for MySQL

Exit Print View

Updated: August 2018
 
 

Replicating a MySQL Protection Group Configuration to a Partner Cluster

This section contains information about replicating the MySQL protection group.

How to Replicate a MySQL Protection Group to a Partner Cluster

Before You Begin

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.

  • Application resource groups are online only on the primary cluster when the protection group is activated.

  • The Auto_start_on_new_cluster property of the resource groups is set to false.

    • To view the Auto_start_on_new_cluster property, use following command:

      # clresourcegroup show -p auto_start_on_new_cluster apprg1
    • If you need to set the Auto_start_on_new_cluster property to false, use the following command:

      # 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 disaster recovery framework 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 framework does not automatically start the resource group on the primary cluster.

  • Replicate the protection group configuration to the partner cluster.
    # geopg get -s partnership-name mysql-pg

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

    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 the the disaster recovery framework. 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 Installing and Configuring an Oracle Solaris Cluster 4.4 Environment and the cluster(8CL)and clresource(8CL) man pages.


Example 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.

#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.

See Also

To perform switchover and takeover of protection groups, see Chapter 11, Migrating Services in Administering the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.

To perform recovery after takeover of a MySQL protection group, see Recovery Strategy After a Takeover of a MySQL Protection Group.