Go to main content

Oracle® Solaris Cluster Data Replication Guide for MySQL

Exit Print View

Updated: August 2018
 
 

Adding a Data-Replicated Component to a MySQL Protection Group

A protection group is the container for the application resource groups, which contain data for services that are protected from disaster. The disaster recovery framework protects the data by replicating it from the primary cluster to the secondary cluster. By adding a data-replicated component to a protection group, the framework monitors the replication status of a MySQL database. The framework also controls the role and state of the database during protection group operations such as start, stop, switchover, and takeover.

This section provides the following information:

How to Add a Data-Replicated Component to a MySQL Protection Group


Note -  You can also accomplish this procedure by using the Oracle Solaris Cluster Manager GUI. Click Partnerships, click the partnership name, click the protection group name, and in the Data Replication Components section click Add. For more information about Oracle Solaris Cluster Manager, see Chapter 12, Using the Oracle Solaris Cluster Manager Browser Interface in Administering an Oracle Solaris Cluster 4.4 Configuration.

Before You Begin

Ensure that the following conditions are met:

  1. Log in to a cluster node.
  2. Add a data-replicated component to the protection group.

    The following command adds a replication component 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 with the same name.

    # geopg add-replication-component -p property [-p…] mysql-replicated-component protection-group

    In this syntax, –p property specifies the properties of the data-replicated component group. You can specify the following script-based plug-in properties:

    • switchover_args – Specifies the command-line arguments for the switchover script

    • takeover_args – Specifies the command-line arguments for the takeover script

    • start_replication_args – Specifies the command-line arguments for the start_replication script

    • remove_config_args – Specifies the command-line arguments for the remove_configuration script

    • create_config_args – Specifies the command-line arguments for the create_configuration script

    • stop_replication_args – Specifies the command-line arguments for the stop_replication script


    Caution

    Caution  -  Make sure that the command-line arguments are the same for all scripts.


    For more information about the properties you can set, see Property Descriptions for Script-Based Plug-Ins in Administering the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.

    Also in this syntax, mysql-replicated-component specifies the name of the new data-replicated component, and protection-group specifies the name of the protection group that will contain the new data-replicated component.

    For information about the names and values that are supported, see Appendix B, Legal Names and Values of Disaster Recovery Framework Entities, in Administering the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.

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


    Note -  Because the add operation for the replication component is performed during the scripted registration, an example is not provided here.

Data Replication Subsystem Process for Verifying the Replicated Component

During protection group validation, the MySQL data replication layer validates the application resource groups and the data replication entities by verifying that an application resource group in the protection group has its Auto_start_on_new_cluster property set to false.

When you bring a protection group online on the primary cluster, bring the application resources groups participating in that protection group online only on the same primary cluster. Setting the Auto_start_on_new_cluster property to false prevents the Oracle Solaris Cluster resource group manager from automatically starting the application resource groups. In this case, the startup of resource groups is reserved for the disaster recovery framework.

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

The Mysql geocontrol module supplies a script that is used by the script-based plug-in module. The script entry points require the same set of arguments. These arguments are validated for semantics and completeness. The following validation checks are performed:

  • Are all of the mandatory arguments defined?

  • Is the configured MySQL database resource defined?

  • Is the specified replication resource configured with a correct start command, if the resource exists already?

  • Are the long and short ping intervals numeric?

When the validation is complete, the disaster recovery framework adds the application resource group to the protection group.


Note -  Every entry point of the underlying script-based plug-in has a validation method. In the case of the MySQL replication, all the validation methods are the same.