HP Serviceguard Enterprise Cluster Master Toolkit User Guide, December 2012 (5900-2145)

# cmmakepkg -p db1pkg.conf
# cmmakepkg -s db1pkg.cntl
Edit the package configuration file db1pkg.conf:
PACKAGE_NAME - Set to any name desired.
PACKAGE_TYPE - Set to FAILOVER.
RUN_SCRIPT /etc/cmcluster/db1_package/db1pkg.cntl
HALT_SCRIPT /etc/cmcluster/db1_package/db1pkg.cntl
DEPENDENCY_NAME oc_dependency
DEPENDENDY_CONDITION <SGeRAC OC MNP Package>=UP
DEPENDENCY_LOCATION SAME_NODE
Configure the service parameters:
SERVICE_NAME ORACLE_DB1_SRV
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
If listener is configured and needs to be monitored, configure another set of service parameters:
SERVICE_NAME ORACLE_LSNR_SRV
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
Edit the package control script db1pkg.cntl
LVM logical volumes are used in disk groups, set VGCHANGE to "vgchange -a e", and then
specify the names of the volume groups in VG[0], VG[1].
Configure the package service:
SERVICE_NAME[0]="ORACLE_DB1_SRV"
SERVICE_CMD[0]="/etc/cmcluster/db1_package/toolkit.sh monitor"
SERVICE_RESTART[0]="-r 2"
If listener service is configured in the package configuration file, set the following parameters:
SERVICE_NAME[1]="ORACLE_LSNR_SRV"
SERVICE_CMD[1]="/etc/cmcluster/db1_package/toolkit.sh monitor_listener"
SERVICE_RESTART[1]="-r 2"
Configure the Package IP and the SUBNET.
Add in the customer_defined_run_cmds function:
/etc/cmcluster/db1_package/toolkit.sh start
Add in the customer_defined_halt_cmds function:
if [ $SG_HALT_REASON = "user_halt" ]; then
reason="user"
else
reason="auto"
fi
/etc/cmcluster/db1_package/toolkit.sh stop $reason
"user" indicates that the package halt is a user initiated halt and "auto" indicates that the
package is being failed over automatically due to package dependencies, failure of a service
or due to dependent package failures.
5. Distribute the package configuration file, package control script, and the framework scripts
to all nodes in the cluster on which the package is configured to run, and then apply the
package configuration.
# cmapplyconf -P db1pkg.conf
6. Run the database package:
60 Using the Oracle Toolkit in an HP Serviceguard Cluster