Create the Serviceguard package using Modular method.Follow these steps to create Serviceguard package using Modular method:1.Create a directory for the package:

#mkdir /etc/cmcluster/pkg/db2_pkg/

2.Copy the toolkit template and script files from db2 directory:

#cd /etc/cmcluster/pkg/db2_pkg/

#cp /opt/cmcluster/toolkit/db2/* ./

3.Create a configuration file (pkg.conf) as follows:

#cmmakepkg -m ecmt/db2/db2 pkg.conf

4.Edit the package configuration file.

NOTE: DB2 toolkit configuration parameters in the package configuration file have been prefixed by ecmt/db2/db2 when used in Serviceguard A.11.19.00. For example,

/etc/cmcluster/pkg/db2_pkg/pkg.conf

The configuration file should be edited as indicated by the comments in that file. The package name needs to be unique within the cluster. For clarity, use the name of the database instance to name the package. For example,

PACKAGE_NAMEdb2_payroll

List the names of the clustered nodes to be configured to run the package, using the NODE_NAME parameter.

NODE_NAMEnode1

NODE_NAMEnode2

Set the script_log_file variable. For example,

script_log_file/etc/cmcluster/pkg/<pkg_dir>/log

Set the TKIT_DIR variable as the path of <package_directory>. For example,

TKIT_DIR/etc/cmcluster/pkg/pkg01

Set the INSTANCE_NAME variable as the DB2 instance name. For example,

INSTANCE_NAMEdb2_payroll_inst

Set the PARTITION_NUMBER variable to the partition numbers of the database which need to be started, stopped and monitored using this package. By default it is set to 0. Repeat the above variable to add additional partitions. For example,

PARTITION_NUMBER0

PARTITION_NUMBER1

NOTE: Logical partitions of a database can be grouped to run in a single package while physical partitions need separate packages for each.

Set the MONITOR_PROCESSES variable to process names, which must be monitored and cleaned up to ensure fail safe shutdown of the DB2 Instance or Partition. The actual monitoring is done by a command called db2gcf. The MONITOR_PROCESSES is only used to kill the processes that remain alive after the shutdown of the database. By default,

.db2sysc. is configured in this variable. Repeat the variable to additional processes if required. For example,

MONITOR_PROCESSES db2sysc

Set the MAINTENANCE_FLAG variable to “yes” or “no”, to “enable” or “disable” the maintenance mode feature for the package. For example,

MAINTENANCE_FLAGyes

80 Using the DB2 database Toolkit in a Serviceguard Cluster in HP-UX