HP Serviceguard Enterprise Cluster Master Toolkit User Guide, June 2014
3. The service name must be the same as defined in the package configuration file. Always call
the toolkit.sh script with monitor for the SERVICE_CMD definitions. For example,
SERVICE_NAME[0]=payroll_inst_service
SERVICE_CMD[0]="/etc/cmcluster/pkg/db2_pkg/tookit.sh monitor"
SERVICE_RESTART[0]="-r 3
4. Edit the customer_defined_run_cmds function to run the toolkit.sh script with the start
option. For example,
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:
84 Using the DB2 Database Toolkit in a Serviceguard Cluster in HP-UX