Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Geographic Edition System Administration Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

## Activating and Deactivating a MySQL Protection Group

This section describes the following tasks:

- Activating a MySQL Protection Group

- Deactivating a MySQL Protection Group

When you activate a protection group, it assumes the role that you assigned to it during configuration. For more information about configuring protection groups, see How to Create the MySQL Configuration.

### Activating a MySQL Protection Group

You can activate a protection group in the following ways:

- Globally, which activates a protection group on both clusters where the protection group has been configured

- On the primary cluster only

- On the secondary cluster only

1. Activate the protection group.

   Use the following command to activate the protection group on the primary and secondary clusters depending on the scope of the command. When you activate a protection group on the primary cluster, its application resource groups are also brought online.

       # geopg start -e scope [-n] MySQL-Protection-group

   In this syntax, `-e` scope specifies the scope of the command. If the scope is local, the command operates on the local cluster only. If the scope is global, the command operates on both clusters that deploy the protection group.

   Note - The property values, such as global and local, are not case sensitive.

   Also in this syntax, `-n` prevents the start of data replication at protection group startup. If you omit this option, the `geopg start`command performs the following actions if the role of the protection group is secondary on the local cluster:

- Starts the MySQL slave threads

- Prevents modification by non-`root` roles if this option is configured

- Prepares the `my.cnf` file to start the database with modifications prevented for non-`root` roles if this option is configured

Also in this syntax, `MySQL-Protection-group` specifies the name of the protection group.

The `geopg start`command uses the `clresourcegroup online -M` command to bring resource groups and resources online. For more information, see the `clresourcegroup`(1CL) man page.

The `geopg start`command performs the following actions if the role of the protection group is primary on the local cluster:

- Prepares the `my.cnf` file to start the database without the slave threads

- Brings online the application resource groups in the protection group on the local cluster

  If the command fails, the configuration status might be set to Error depending on the cause of the failure. The protection group remains deactivated but data replication might be started, and some resource groups might be brought online. Run the `geoadm status`command to obtain the status of your system.

  If the configuration status is set to Error, revalidate the protection group by using the procedure described in Validating a MySQL Protection Group.

Example F-8 Globally Activating a MySQL Protection Group

In the following example, a protection group is globally activated:

    # geopg start -e global mysql-pg

Example F-9 Locally Activating a MySQL Protection Group

In the following example, a protection group is activated on a local cluster only. This local cluster might be a primary cluster or a secondary cluster, depending on the role of the cluster.

    # geopg start -e local mysql-pg

### Deactivating a MySQL Protection Group

You can deactivate a protection group in the following ways:

- Globally, meaning you deactivate a protection group on both the primary cluster and the secondary cluster where the protection group is configured

- On the primary cluster only

- On the secondary cluster only

1. Deactivate the protection group.

   Use the following command to deactivate the protection group on all nodes of the primary and secondary clusters depending on the scope of the command. When you deactivate a protection group, its application resource groups are also unmanaged.

        # geopg stop -e scope [-D] protection-group

   In this syntax, `-e` `scope` specifies the scope of the command. If the scope is local, the command operates on the local cluster only. If the scope is global, the command operates on both clusters where the protection group is deployed.

   Note - The property values, such as global and local, are not case-sensitive.

   Also in this syntax, `-D` specifies that only data replication should be stopped and that the protection group should be online. If you omit this option, the data replication subsystem and the protection group are both stopped. If the role of the protection group on the local cluster is primary, omitting the `-D` option also results in taking the application resource groups offline and putting them in an unmanaged state.

   In addition, `protection-group` specifies the name of the protection group.

   If the `geopg stop`command fails, run the `geoadm status`command to obtain the status of each component. For example, the configuration status might be set to Error depending on the cause of the failure. The protection group might remain activated even though some resource groups might be unmanaged. The protection group might be deactivated with data replication running.

   If the configuration status is set to Error, revalidate the protection group by using the procedure described in Validating a MySQL Protection Group.

Example F-10 Deactivating a MySQL Protection Group on All Clusters

In the following example, a protection group is deactivated on all clusters:

    # geopg stop -e global mysql-pg

Example F-11 Deactivating a MySQL Protection Group on a Local Cluster

In the following example, a protection group is deactivated on the local cluster:

     # geopg stop -e local mysql-pg

Example F-12 Stopping MySQL Data Replication While Leaving the Protection Group Online

In the following example, data replication is stopped on the local cluster only:

    # geopg stop -e local -D mysql-pg

If you decide later to deactivate both the protection group and its underlying data replication subsystem, you can rerun the command without the `-D` option. For example:

     # geopg stop -e local mysql-pg

Example F-13 Deactivating a MySQL Protection Group While Keeping Application Resource Groups Online

In the following example, two application resource groups, `apprg1` and `apprg2`, are kept online while their protection group, `mysql-pg`, is deactivated. First, the application resource groups are removed from the protection group. Then, the protection group is deactivated.

    # geopg remove-resource-group apprg1,apprg2 mysql-pg
     # geopg stop -e global mysql-pg

Copyright © 2004, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |