Go to main content

Disaster Recovery Framework Reference for Oracle® Solaris Cluster 4.4

Exit Print View

Updated: August 2018
 
 

geopg (8)

Name

geopg - create or manage protection groups

Synopsis

SYNOPSIS
/usr/cluster/bin/geopg [subcommand] -?
/usr/cluster/bin/geopg -V
/usr/cluster/bin/geopg add-device-group -p property [-p…] component protection-group
/usr/cluster/bin/geopg add-replication-component -p property [-p…] component protection-group
/usr/cluster/bin/geopg add-resource-group resource-group[,resource-group…] protection-group
/usr/cluster/bin/geopg create -s partnership -o local-role [-d data-replication-type]
[-p property [-p…]] protection-group
/usr/cluster/bin/geopg delete protection-group
/usr/cluster/bin/geopg get -s partnership [protection-group]
/usr/cluster/bin/geopg list [-s partnership[,…]] [protection-group […]]
/usr/cluster/bin/geopg modify-device-group component -p property [-p…] protection-group
/usr/cluster/bin/geopg modify-replication-component component -p property [-p…]
protection-group
/usr/cluster/bin/geopg remove-device-group component protection-group
/usr/cluster/bin/geopg remove-replication-component component protection-group
/usr/cluster/bin/geopg remove-resource-group resource-group[,resource-group…] 
protection-group
/usr/cluster/bin/geopg set-prop -p property [-p…] protection-group
/usr/cluster/bin/geopg show [-s partnership[,…]] [protection-group […]]
/usr/cluster/bin/geopg start -e {local | global} [-n] protection-group
/usr/cluster/bin/geopg status [-v] [-s partnership[,…]] [protection-group […]]
/usr/cluster/bin/geopg stop -e {local | global} [-D] protection-group
/usr/cluster/bin/geopg switchover -m new-primary-cluster [-f] protection-group
/usr/cluster/bin/geopg takeover [-f] protection-group
/usr/cluster/bin/geopg update protection-group
/usr/cluster/bin/geopg validate protection-group

Description

The geopg command enables you to configure and maintain protection groups. To administer a multigroup of protection groups, instead use the geomg command. See the geomg(8) man page.

Before you create a protection group, ensure that the clusters that will host the protection group are already placed in a partnership.

To run the geopg command to create, modify, or delete a protection group or a data-replication component, you must be assigned the proper rights profile.

If you have root access, you have permission to perform any operation. If you do not have root access, the following rights apply:

  • Basic Solaris User. You can read information about the Oracle Solaris Cluster disaster recovery framework (formerly called Geographic Edition) entities by running commands such as geopg list.

  • Geo Management. You can perform all the read operations that someone with Basic Solaris User access can perform. You can use commands such as geopg create, geopg switchover, geopg start, and geopg stop to perform administrative and configuration operations.

For more information, see the rbac(7) man page and Planning Security in Installing and Configuring the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.

The general form of this command is as follows:

geopg [subcommand] [options] [operands] 

You can omit subcommand only if options specifies the option –?, –o, –V, or –v.

Each option of this command has a long form and a short form. Both forms of each option are given with the description of the option in the OPTIONS section of this man page.

How Protection Groups Start

The geopg start command activates the protection group on both the primary and standby clusters. This activation starts the disaster recovery framework management of the resource groups in the protection group. Depending on the form of the command that you use and on the cluster where you issue the command, activating the protection group might not start the resource groups on that cluster. The resource groups start, or are brought online, only on the primary cluster.

The –e option defines the scope of the geopg start command. If you specify -e local, the geopg start command runs on the cluster where you issue the command. If you specify -e global, the geopg start command runs on both clusters in the partnership.

The different forms of the command have the following effects:

  • If you run the geopg start -e local command on the primary cluster, and if you run the geopg start -e global command on either cluster, the disaster recovery framework activates the protection group on both clusters in the partnership. The software brings online resource groups on the primary cluster only. The resource groups are put in a managed state.

  • If you run the geopg start -e local command on the standby cluster, the disaster recovery framework activates the protection group on the standby cluster only. Resource groups are not started on the standby cluster. The resource groups are put in the Unmanaged state.

Sub Commands

The following subcommands are supported:

add-device-group

Enables a data replication component to be part of a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

This subcommand functions equivalently to the add-replication-component subcommand.

add-replication-component

Enables a data replication component to be part of a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

This subcommand functions equivalently to the add-device-group subcommand.

add-resource-group

Enables an application resource group to be part of a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

If a protection group is active when you add a resource group, the resource group must be in either the Unmanaged or Online state. To start an unmanaged resource group, run the geopg start command.

If a protection group is inactive, the resource group must be in the Unmanaged state when you add the resource group. If the resource group is offline, bring the resource group to the Unmanaged state before adding the resource group to an inactive protection group.

create

Creates a protection group within an existing partnership. The system performs this action on only the local cluster.

delete

Deletes a protection group. The system performs this action on only the local cluster.

If the protection group is also configured in a multigroup, deletion of the protection group succeeds with a warning message to remove the protection group from the multigroup that contains it. Use the geomg remove-protection-group command to remove a protection group from a multigroup. For more information, see the geomg(8) man page.

get

Creates the local configuration for a protection group that already exists on the remote partner cluster by retrieving the configuration from the partner cluster. If you do not specify a protection group name, all the protection groups that have been configured for the partnership on the remote cluster will be created on the local cluster. The system performs this action on only the local cluster.

list

Displays a list of the protection groups in the issuing cluster.

modify-device-group

Modifies the properties of a data replication component. The system performs this action on the local cluster, then propagates the action to the partner cluster.

This subcommand functions equivalently to the modify-replication-component subcommand.

modify-replication-component

Modifies the properties of a data replication component. The system performs this action on the local cluster, then propagates the action to the partner cluster.

This subcommand functions equivalently to the modify-device-group subcommand.

remove-device-group

Removes data replication components from a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

Removing a data replication component does not stop data replication or change the data replication status for that data replication component.

This subcommand functions equivalently to the remove-replication-component subcommand.

remove-replication-component

Removes data replication components from a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

Removing a data replication component does not stop data replication or change the data replication status for that data replication component.

This subcommand functions equivalently to the remove-device-group subcommand.

remove-resource-group

Removes resource groups from a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

Removing an application resource group does not change the application resource group to the Unmanaged state.

set-prop

Modifies the properties of a protection group. The system performs this action on the local cluster, then propagates the action to the partner cluster.

show

Displays the following information about the protection group:

  • Defined protection groups

  • Resource groups that are wrapped into protection groups

  • Operation status information

Use a space-separated list to specify multiple protection groups.

If you do not specify the name of a protection group, the show subcommand displays information for all the protection groups configured on the local cluster. The system performs this action on only the local cluster.

start

Starts a protection group. When you start a protection group for the first time, the role of the protection group on a cluster is the role that was assigned to the protection group when you created the protection group. After that, the protection group starts with the latest role it was given.

The start subcommand uses Oracle Solaris Cluster commands to bring resources and resource groups under the management of the protection group.

You can start a protection group on the following levels, depending on whether you specify local or global to the –e option:

  • With the –e global option, starts the protection group on all clusters where the protection group has been configured

  • With the –e local option, starts the protection group on either the primary cluster or standby cluster, whichever cluster the command is issued from

For more details about activating a protection group and the effects on the resource groups in that protection group, see "How Protection Groups Start" in the DESCRIPTION section of this man page.

Starting a protection group enables the following events to occur:

  • The protection group configuration is validated.

  • Clusters can determine whether an operation has been completed.

  • Data replication can be started, depending on the data replication that you use.

    • When using the Oracle Data Guard software, you can start data replication from the primary cluster by using the local or the global scope.

    • When using Oracle Solaris ZFS snapshots, you can start data replication from either the primary or secondary cluster by using the global scope.

    For all supported data replication software, you must not specify the –n option when using this form of the command.

  • Protected applications can be started.

  • If the partner can be reached, the partner cluster can be notified of the protection group activation.


Note -  Protection groups that are referred to as "online" are active protection groups.
status

Displays the status of the protection group.

Use a space-separated list to specify multiple protection groups.

If you do not specify the name of a protection group, the status subcommand displays the status for all the protection groups configured on the local cluster. The system performs this action on only the local cluster.

stop

Stops a protection group. You can stop a protection group on the following levels, depending on whether you specify local or global to the –e option:

  • With the –e global option, stops the protection group on all clusters where the protection group has been configured

  • With the –e local option, stops the protection group on either the primary or standby cluster, whichever cluster the command is issued from

Stopping a protection group enables the following events to occur:

  • The protection group becomes inactive.

  • Data replication and application resource groups stop. You can prevent application resource groups from stopping by taking the resource groups out of the protection group before you stop the protection group.

    • When using Oracle Data Guard, you can stop data replication from either the primary or standby cluster, by using either the local or the global scope.

    • When using Oracle Solaris ZFS snapshots, you can stop data replication from only the primary cluster by using either the local or the global scope.

  • If the partner cluster is reachable, the partner cluster is notified that the protection group has been stopped.

switchover

Switches the assigned role of a cluster in the protection group. You must start the protection group before you can perform a switchover.

takeover

Forces a cluster to become the primary cluster without considering the partner cluster state.

If you issue a takeover from the standby cluster and the cluster is able to communicate with the partner cluster, the disaster recovery framework switches the role of the partner cluster so that the partner cluster becomes the new standby. This operation is not the same as a switchover. The protection group is deactivated on the new standby.

After the geopg takeover command successfully completes, reactivating the protection group on the standby cluster might require that you recover and synchronize data.


Note -  When possible, run the geopg switchover command instead of the geopg takeover command to coordinate between partner clusters to avoid loss of replicated data.

Run the geopg takeover command only in situations when the primary cluster is not available or during unplanned downtime. The situation must justify a potential loss of data and the time required to repair and to reactivate the protection group on the standby cluster.


update

Resynchronizes the configuration information of the local protection group with the partner's configuration information. The geopg update command overwrites the configuration information of the protection group on the local cluster with the configuration information from the partner cluster. This command does not overwrite replicated data. The system performs this action on only the local cluster.

validate

Validates a protection group on the local cluster by performing a sanity check of the dynamic values. The system performs this action on only the local cluster.

Options

The following options are supported:

–?
–-help

Displays help information.

You can specify this option with or without a subcommand.

  • If you specify this option without a subcommand, the list of subcommands for this command is displayed.

  • If you specify this option with a subcommand, the usage options for the subcommand are displayed.

The question mark might be interpreted as a special character by some shells. Use quotes (–"?") or an escape character to avoid pattern matching.

–D
–-only-datarep

Specifies that only the data replication should be deactivated, leaving the protection group active. If you do not use this option, the entire protection group is deactivated. To stop a protection group that has already had its data replication subsystem stopped, you must run the geopg stop command again and omit this option.

–d data-replication-type
–-datarep-type data-replication-type

Specifies the data replication mechanism for data replication between the clusters of the protection group.

The data-replication-type must be one of the following strings:

odg

Specifies that the data replication mechanism is Oracle Data Guard.

sbp

Specifies that the data replication mechanism is a script-based plug-in.

–e {local|global}
–-scope {local|global}

Specifies whether the command operates only on the local cluster, local, or on both clusters, global, where the protection group has been configured.

–f
–-force

Forces the command to perform the operation without asking you for confirmation.

–m new-primary-cluster
–-primary new-primary-cluster

Specifies the name of the cluster that is to be the new primary cluster for the protection group.

–n
–-nodatarep

This option is only valid when starting a protection group that is not active. If the protection group is not active, it is started without data replication. If data replication for this protection group is already running independently, it is stopped before the protection group is started.

If the protection group is already active with data replication enabled, data replication is not stopped. An error message is displayed that states that the geopg stop -D command should be used to stop data replication for an active protection group.

If this option is omitted, data replication starts at the same time as the protection group.

–o local-role
–-role local-role

Specifies the role of the local cluster as either primary or secondary when used with the create subcommand. You can change the role of a cluster by running the geopg switchover command.

–p property
–-property property

Sets the properties of a protection group.

A protection group property is assigned a value by using a name=statement pair statement. You can set multiple properties at one time by using multiple statements.

See the EXTENDED DESCRIPTION section for defined properties.

–s partnership
–-partnership partnership

Specifies the name of the existing partnership where the protection group is configured.

–V
–-version

Displays the version of the command.

Do not specify this option with subcommands, operands, or other options, as they are ignored. The –V option only displays the version of the command. No other operations are performed.

–v
–-verbose

This option is valid with the status subcommand.

The –v option displays error messages if the configuration is in the Error state and status messages for replication resources that are in the FAULTED and DEGRADED states.

Operands

The following operands are supported:

component

Specifies the name of any data replication component that you want to add. Data replication components include MySQL data replication components, Oracle Data Guard configurations, Oracle ZFS Storage Appliance replicated projects, and Oracle Solaris ZFS snapshots replication components.

protection-group

Specifies the name of the protection group. The create subcommand fails if the protection group that you specify with this option already exists. The modify subcommand fails if the specified protection group is not valid.

resource-group

Specifies a comma-separated list of resource groups to add to or delete from the protection group. The specified resource groups must already be defined.

If a protection group is active when you add a resource group, the resource group must be in either the Unmanaged or Online state. To start an unmanaged resource group, run the geopg start command.

If the protection group is inactive when you add a resource group, the resource group must be in the Unmanaged state before you add the resource group.

Extended Description

This section contains descriptions of general protection group properties and data replication component properties. You can specify general protection group properties with the geopg set-prop command You can specify data replication extension properties with the geopg add-device-group, add-replication-component, geopg modify-device-group, and modify-replication-component commands.


Note -  Property names and property values, such as true and false, are not case sensitive.

General Protection Group Properties

Description (string)

Describes the protection group. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Category:

Optional

Default:

None

Tunable:

Assigned at creation and tunable at runtime

External_Dependency_Allowed (boolean)

Specifies whether to allow any dependencies between resource groups and resources that belong to this protection group and resource groups and resources that do not belong to this protection group. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Category:

Optional

Default:

False

Tunable:

Any time

RoleChange_ActionArgs (string)

Specifies the arguments that follow the system-defined arguments that are paired with the role change callback script during a protection group switchover or takeover. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Category:

Optional

Default:

None

Tunable:

Assigned at creation and tunable at runtime

RoleChange_ActionCmd (string)

Specifies the absolute path to the executable file to run when the primary cluster of the protection group changes. This file should exist on all nodes of both partner clusters that host the protection group, and have execute permissions for the user that launches the script. This script is run before the application resource group is brought online on the new primary cluster. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Category:

Optional

Default:

None

Tunable:

Assigned at creation and tunable at runtime

Timeout (integer)

Specifies, in seconds, the longest time that the disaster recovery framework waits for a response after running a geopg command. Examples of responses include start, stop, switchover, and takeover. If the command does not return within the timeout period, the disaster recovery framework reports the operation as timed out, even if the underlying command that was run eventually completes successfully.

The Timeout period applies to operations on a per-cluster basis. An operation with a local scope times out if the operation is not completed after the specified Timeout period.

An operation with a global scope consists of an action on the local cluster and an action on the remote cluster. The local and remote actions are timed separately. So, an operation with a global scope times out if the local operation is not completed after the specified Timeout period or if the remote operation is not completed after the specified timeout period.

For example, the following command is started with a local scope:

# geopg start -e local protection-group

If you set the Timeout property to 3000 seconds, the geopg start command times out if the operation does not complete after 3000 seconds.

You can start the same command with a global scope as follows:

# geopg start -e global protection-group

If the Timeout property is set to 3000 seconds, the geopg start command times out if the operation is not completed on the local cluster after 3000 seconds or if the operation is not completed on the remote cluster after 3000 seconds. If the local action takes 1500 seconds and the remote action takes 1500 seconds, the operation is not timed out.

The protection group Timeout value is an estimated value that is applied to some suboperations. The Timeout value does not apply to the entire operation, so not every operation on a protection group is timed against the Timeout period. For example, the time taken to initialize the data structure and to check for the precondition of the operation is not timed in the Timeout period.

If you change the Timeout value of a protection group that is part of a multigroup, you must run the geomg validate command on that multigroup This command recalculates the multigroup Timeout value to include the new Timeout value of the modified protection group.

You can specify a maximum of 1000000 (one million) seconds for the Timeout property.

Category:

Optional

Default:

3600

Tunable:

Assigned at creation and tunable at runtime

Data Replication Component Properties

This section contains descriptions of the properties that you can specify for each type of data replication product.

MySQL Data Replication Component Properties
Replication component property: switchover_args

Specifies the command-line arguments for the switchover script.

Replication component property: takeover_args

Specifies the command-line arguments for the takeover script.

Replication component property: start_replication_args

Specifies the command-line arguments for the start_replication script

Replication component property: remove_config_args

Specifies the command-line arguments for the remove_configuration script.

Replication component property: create_config_args

Specifies the command-line arguments for the create_configuration script.

Replication component property: stop_replication_args

Specifies the command-line arguments for the stop_replication script.

Oracle Data Guard Data Replication Component Properties
Data replication component property: local_database_name (string)

Name of the local Oracle database in the Oracle Data Guard broker configuration that is being replicated to the remote cluster. This name is the Oracle db_unique_name initialization parameter for the Oracle RAC database on the local cluster. The name is also set on the partner cluster as the remote_database_name value.

Category:

Required

Default:

None

Tunable:

At creation

Data replication component property: local_db_service_name (string)

Oracle net service name that is used to connect to the local Oracle database. The name is also set on the partner cluster as the remote_db_service_name value.

Category:

Required

Default:

None

Tunable:

Any time

Data replication component property: local_rac_proxy_svr_rg_name (string)

Name of the local Oracle RAC server proxy, Oracle External Proxy, or Oracle Database resource group that manages the local database in the Oracle Data Guard broker configuration. The name is also set on the partner cluster as the remote_rac_proxy_svr_rg_name value.

Category:

Required

Default:

None

Tunable:

At creation

Data replication component property: remote_database_name (string)

Name of the remote database in the Oracle Data Guard broker configuration that is being replicated from the local cluster. This name is the Oracle db_unique_name initialization parameter for the Oracle RAC database on the remote cluster. The name is also set on the local cluster as the local_database_name value.

Category:

Required

Default:

None

Tunable:

At creation

Data replication component property: remote_db_service_name (string)

Oracle net service name that is used to connect to the remote Oracle database. The name is also set on the local cluster as the local-db_service_name value.

Category:

Required

Default:

None

Tunable:

Any time

Data replication component property: remote_rac_proxy_svr_rg_name (string)

Name of the remote Oracle RAC server proxy, Oracle External Proxy, or Oracle Database resource group on the partner cluster that manages the remote database in the Oracle Data Guard broker configuration. The name is also set on the local cluster as the local_rac_proxy_svr_rg_name value.

Category:

Required

Default:

None

Tunable:

At creation

Data replication component property: standby_type (string)

Type of Oracle standby database that is used in the Oracle Data Guard broker configuration. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Valid values to which you set this property are logical, physical, and standby.

Category:

Required

Default:

None

Tunable:

At creation

Data replication component property: sysdba_password (string)

Password for the Oracle SYSDBA privileged database user. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Do not specify a password on the command line. If you specify only -p sysdba_password=, the geopg command prompts you to type an actual password, which is not displayed as you type it.

Category:

Required

Default:

None

Tunable:

Any time

Data replication component property: sysdba_username (string)

Name of an Oracle SYSDBA privileged database user who can perform the Oracle Data Guard broker switchover and takeover operations on both the primary and standby clusters. The Oracle Solaris Cluster disaster recovery framework uses this property to monitor and manage the Oracle Data Guard broker configurations. The system sets this property on the local cluster, then propagates the value to the partner cluster.

Category:

Required

Default:

None

Tunable:

Any time

Oracle ZFS Storage Appliance Replication Component Properties
Data replication component property: local_service_password

A password that might be needed by the scripts to perform some function on the local system that requires the entry of a password.

Data replication component property: remote_service_password

A password that might be needed by the scripts to perform some function on the remote system that requires the entry of a password.

Oracle ZFS Snapshots Replication Component Properties

Specify the property values in the setup configuration file provided for the Oracle Solaris ZFS snapshots feature and execute the setup script. For information about the properties and their values, see the Oracle Solaris ZFS Snapshots Replication Guide.


Note -  You must use the zfs_snap_geo_register script with the updated configuration file to change properties of a Oracle Solaris ZFS snapshots replication component.

Exit Status

The following exit values are returned:

0

The command completed successfully.

nonzero

An error occurred.

Examples

Example 1 Adding an Oracle Data Guard broker Configuration to a Protection Group

The following geopg command adds the Oracle Data Guard broker configuration mysales.com to the protection group sales-pg.

To ensure security, do not supply a password when you specify the sysdba_password property. If you do not provide a password, the geopg command prompts for one.

phys-paris-1# geopg add-replication-component \
-p local_database_name=sales \
-p remote_database_name=salesdr \
-p local_db_service_name=sales-svc \
-p remote_db_service_name=salesdr-svc \
-p standby_type=physical \
-p sysdba_username=sys \
-p sysdba_password= \
-p local_rac_proxy_svr_rg_name=sales-rac-proxy-svr-rg \
-p remote_rac_proxy_svr_rg_name=salesdr-rac-proxy-svr-rg \
mysales.com sales-pg

Oracle Data Guard configuration "mysales.com" successfully added to the 
protection group "sales-pg"
Example 2 Creating a Protection Group That Uses Data Replication

The following geopg command creates an Oracle Data Guard protection group odgpg on the primary cluster cluster-paris.

# geopg create -s paris-newyork-ps -d odg -o primary odgpg
Example 3 Creating a Protection Group That Does Not Use Data Replication

The following geopg command creates a protection group example-pg that is not configured to use data replication.

# geopg create -s paris-newyork-ps -o primary example-pg
Example 4 Deleting a Protection Group While Keeping Application Resource Groups Online

The following geopg command keeps two application resource groups, apprg1 and apprg2, online while deleting their protection group, odgpg. Remove the application resource groups from the protection group, then delete the protection group.

# geopg remove-resource-group apprg1,apprg2 odgpg
# geopg stop -e global odgpg
# geopg delete odgpg
Example 5 Modifying a Protection Group

The following geopg command modifies the timeout property of the protection group odgpg.

# geopg set-prop -p Timeout=3000 odgpg

Attributes

See attributes(7) for descriptions of the following attributes.

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/geo/geo-framework
Interface Stability
Evolving

See Also

geoadm(8), geohb(8), geomg(8), geops(8), rbac(7)