JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Geographic Edition System Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Introduction to Administering the Geographic Edition Software

2.  Before You Begin

3.  Administering the Geographic Edition Infrastructure

4.  Administering Access and Security

5.  Administering Cluster Partnerships

6.  Administering Heartbeats

7.  Administering Protection Groups

8.  Monitoring and Validating the Geographic Edition Software

9.  Customizing Switchover and Takeover Actions

10.  Script-Based Plug-Ins

A.  Standard Geographic Edition Properties

B.  Legal Names and Values of Geographic Edition Entities

C.  Disaster Recovery Administration Example

D.  Takeover Postconditions

E.  Troubleshooting Geographic Edition Software

F.  Deployment Example: Replicating Data With MySQL

Overview of MySQL Replication

MySQL Database Resource Group

MySQL Replication Resource Group

MySQL Application Resource Group

Initial Configuration of MySQL Replication

Installing MySQL and Configuring the MySQL Database Resource Group

How to Configure the MySQL Replication

Configuring the MySQL Application Resource Group

Administering MySQL Protection Groups

Planning for Your MySQL Protection Group

Creating, Modifying, Validating, and Deleting a MySQL Protection Group

How to Create the MySQL Configuration

Modifying a MySQL Protection Group

Validating a MySQL Protection Group

Data Replication Layer Process for Validating the Application Resource Groups and Data Replication Entities

How to Delete a MySQL Protection Group

Administering MySQL Application Resource Groups

How to Add an Application Resource Group to a MySQL Protection Group

How to Delete an Application Resource Group From a MySQL Protection Group

Administering MySQL Data-Replicated Components

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

Data Replication Subsystem Process for Verifying the Replicated Component

How to Modify a MySQL Data-Replicated Component

How to Delete a Data-Replicated Component From a MySQL Protection Group

Replicating a MySQL Protection Group Configuration to a Partner Cluster

Activating and Deactivating a MySQL Protection Group

Activating a MySQL Protection Group

Deactivating a MySQL Protection Group

Resynchronizing a MySQL Protection Group

Recovery Strategy After a Takeover of a MySQL Protection Group

How to Recover After a Takeover

G.  Error Return Codes for Script-Based Plug-Ins

Index

How to Create the MySQL Configuration

Perform this procedure from a node of the primary cluster.

Before You Begin

Ensure that the following conditions are met:

  1. Become superuser or assume a role that is assigned the Geo Management RBAC rights profile.

    For more information about RBAC, see Geographic Edition Software and RBAC.


    Note - If you use a role with Geo Management RBAC rights, ensure that the /var/cluster/geo ACLs are correct on each node of both partner clusters. If necessary, become superuser on the cluster node and set the correct ACLs.

    # chmod A+user:username:rwx:allow /var/cluster/geo

    The /var/cluster/geo directory must have the correct access control lists (ACL) applied for compatibility between the Geo Management RBAC rights profile and Oracle Data Guard.


  2. Create the content for the mysql_geo_config file.
  3. Copy the mysql_geo_config file to a different location.

    For example:

    cl1-phys-node1 # cp /opt/SUNWscmys/geocontrol/util/mysql_geo_config /temp
  4. Specify the following variables in /temp/mysql_geo_config. This list uses sample values.
    PS=mysql-ps PG=mysql-pg REPCOMP=mysql.sbp REPRS=mysql-rep-rs REPRG=mysql-rep-rg DESC="mysql replication pg" CONFIGFILE=/geo-config/sbpconfig REALMYSRG=nyc-rg,sfo-rg REALMYSRS=nyc-mys-rs,sfo-mys-rs READONLY= APPRG=usa-rg LONGPING= SHORTPING=
  5. Create the script-based plug-in configuration file on all nodes of all clusters.

    For example, assuming that the nodes of cluster one are cl1-phys-node1 and cl1-phys-node2, on each node of cluster one, you would issue the following commands:

    cl1-phys-node1 # mkdir /geo-config
    cl1-phys-node1 # echo "mysql.sbp|any|cl1-phys-node1,cl1-phys-node2">/geo-config/sbpconfig

    Assuming that the nodes of cluster two are cl2-phys-node3 and cl2-phys-node4, on each node of cluster two, you would issue the following commands:

    cl2-phys-node1 # mkdir /geo-config
    cl2-phys-node1 # echo "mysql.sbp|any|cl2-phys-node3,cl2-phys-node4">/geo-config/sbpconfig
  6. Execute the mysql_geo_register script on the primary cluster.

    For example:

    cl1-phys-node1 # ksh /opt/SUNWscmys/geocontrol/util/mysql_geo_register -f /temp/mysql_geo_config
  7. Replicate the protection group to the partner cluster.

    The final messages of the registration script outline the required geopg get command. You must log in to one node of the partner cluster and execute that exact command.

    For example:

    cl2-phys-node3 # geopg get --partnership mysql-ps mysql-pg

Next Steps

Go to Activating a MySQL Protection Group.

Modifying a MySQL Protection Group

If the partner cluster contains a protection group with the same name, the geopg set-propcommand also propagates the new configuration information to the partner cluster.

Use the following command to modify a MySQL protection group:

# geopg set-prop -p property[-p...] protection-group

In this syntax, -p property specifies the properties of the protection group, and protection-group specifies the name of the protection group.

For more information about the properties you can set, see Property Descriptions for Script-Based Plug-Ins.

The geopg set-propcommand revalidates the protection group with the new configuration information. If the validation 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 validation is unsuccessful on the partner cluster, the configuration status is set to Error on the partner cluster.

For information about the names and values that are supported, see Appendix B, Legal Names and Values of Geographic Edition Entities.

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

Example F-1 Modifying the Timeout Property of a Protection Group

The following example shows how to modify the timeout property of a protection group.

# geopg set-prop -p Timeout=300 mysql-pg

Validating a MySQL Protection Group

When the configuration status of a protection group is displayed as Error in the geoadm status output, you can validate the configuration by using the geopg validatecommand. This command checks the current status 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 validatecommand finds an error in the configuration files, then the command displays an error message, and the configuration remains in the Error state. In such a case, you can fix the error in the configuration, and rerun the geopg validatecommand.

The geopg validatecommand validates the configuration of the protection group on the local cluster only. To validate the protection group configuration on the partner cluster, rerun the command on the partner cluster.

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.

  1. Validate the configuration of the protection group.

    Use the following command to validate the configuration of a protection group on the local cluster only:

     # geopg validate protection-group

    In this syntax, protection-group specifies a unique name that identifies a single protection group.

    In the following example, the configuration of a protection group is validated:

    # geopg validate mysql-pg

Data Replication Layer Process for Validating the Application Resource Groups and Data Replication Entities

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 Geographic Edition software.

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:

When the validation is complete, the Geographic Edition software creates and brings online the replication resource group and its resources if they don't already exist. If a resource group or resource of the same name already exists, the Geographic Edition software might modify its properties. The software cannot create a new resource group or a resource of the same name if one already exists. After creating the necessary resources, the software adds the application resource group to the protection group.