Designing Disaster Recovery Clusters using Metroclusters and Continentalclusters, Reprinted October 2011 (5900-1881)

5. Add customer-defined run and halt commands in the appropriate places according to the
needs of the application. See Managing Serviceguard for more information on these functions.
6. Copy the environment file template /opt/cmcluster/toolkit/SGCA/
xpca.env to the package directory, naming it pkgname_xpca.env.
# cp /opt/cmcluster/toolkit/SGCA/xpca.env
/etc/cmcluster/pkgname/pkgname_xpca.env
NOTE: If you do not use a package name as a filename for the package control script, you
must follow the convention of the environment file name. This is the combination of the file
name of the package control script without the file extension, an underscore and type of the
data replication technology (xpca) used. The extension of the file must be env. The following
examples demonstrate how the environment file name should be chosen.
Example 1: If the file name of the control script is pkg.cntl, the environment file name would
be pkg_xpca.env.
Example 2: If the file name of the control script is control_script.sh, the environment
file name would be control_script_xpca.env.
7. Edit the environment file <pkgname>_xpca.env as follows:
a. If necessary, add the path where the Raid Manager software binaries have been installed
to the PATH environment variable. If the software is in the usual location, /usr/bin,
you can just uncomment the line in the script.
b. Uncomment the behavioral configuration environment variables starting with AUTO_. It
is recommended that you retain the default values of these variables unless you have a
specific business requirement to change them. See Appendix A for an explanation of
these variables.
c. Uncomment the PKGDIR variable and set it to the full path name of the directory where
the control script has been placed. This directory, which is used for status data files, must
be unique for each package. For example, set PKGDIR
to/etc/cmcluster/package_name, removing any quotes around the file names.
d. Uncomment the DEVICE_GROUP variable and set it to this package’s Raid Manager
device group name, as specified in the Raid Manager configuration file.
e. Uncomment the HORCMPERM variable and use the default value MGRNOINST if Raid
Manager protection facility is not used or disabled. If Raid Manager protection facility
is enabled set it to the name of the HORCM permission file.
f. Uncomment the HORCMINST variable and set it to the Raid Manager instance name used
by Metrocluster/Continuous Access.
g. Uncomment the FENCE variable and set it to either ASYNC, NEVER, or DATA according
to your business requirements or special Metrocluster requirements. This variable is used
to compare with the actual fence level returned by the array.
h. If you are using asynchronous data replication, set the HORCTIMEOUT variable to a value
greater than the side file timeout value configured with the Service Processor (SVP), but
less than the RUN_SCRIPT_TIMEOUT set in the package configuration file. The default
setting is the side file timeout value + 60 seconds.
i. Uncomment the CLUSTER_TYPE variable and set it to metro if you are using Metrocluster,
or continental if you are using Continentalclusters.
8. After customizing the control script file and creating the environment file, and before starting
up the package, do a syntax check on the control script using the following command (be
sure to include the -n option to perform syntax checking only):
# sh -n <pkgname.cntl>
If any messages are returned, you should correct the syntax errors.
180 Building Disaster Recovery Serviceguard Solutions Using Metrocluster with Continuous Access for P9000 and XP