HP Serviceguard Enterprise Cluster Master Toolkit User Guide, December 2012 (5900-2145)
function customer_defined_run_cmds
{
# Start the DB2 database.
/etc/cmcluster/pkg/db2_pkg/toolkit.sh start
test_return 51
}
5. Edit the customer_defined_halt_cmds function to run the toolkit.sh script with the stop
option. For example,
function customer_defined_halt_cmds
{
/etc/cmcluster/pkg/db2_pkg/toolkit.sh stop
test_return 52
}
The Serviceguard package configuration file (pkg.conf).
6. The package configuration file is created with cmmakepkg -p, and must be put in the following
location:
/etc/cmcluster/pkg/db2_pkg/
For example:
/etc/cmcluster/pkg/db2_pkg/pkg.conf
7. You must edit the configuration file as indicated by the comments in that file. The package
name must be unique within the cluster. For clarity, use the name of the database instance to
name the package.
PACKAGE_NAME db2_payroll
For example:
PACKAGE_NAME db2_payroll
8. List the names of the clustered nodes to be configured to run the package, using the NODE_NAME
parameter:
NODE_NAME node1
NODE_NAME node2
9. The service name must match the service name used in the package control script. The service
name can include the DB2 instance name (that is, $DB2_INSTANCE). In the following example,
there is only one service for this package, therefore, the ${DB2_INSTANCE} (that is,payroll_inst)
is assigned to the SERVICE_NAME parameter. For example,
SERVICE_NAME payroll_inst_service
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
10. The run and halt scripts are (typically) identified as the control script, as follows:
RUN_SCRIPT /etc/cmcluster/pkg/db2_pkg/pkg.cntl
HALT_SCRIPT /etc/cmcluster/pkg/db2_pkg/pkg.cntl
11. The DB2 Configuration file, in the package directory, modify the hadb2.conf configuration
file for this DB2 instance. Edit the hadb2.conf as indicated by the comments in that script.
For example,
INSTANCE_NAME=db2_payroll_inst
PARTITION_NUMBER[0]=0
84 Using the DB2 Database Toolkit in a Serviceguard Cluster in HP-UX