Create the Serviceguard package using legacy method.

Follow these steps to create Serviceguard package using legacy method.

mkdir /etc/cmcluster/pkg/db2_pkg/ Copy the toolkit files from db2 cd /etc/cmcluster/pkg/db2_pkg/

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

Create a configuration file (pkg.conf) and package control script pkg.cntl) as follows:

cmmakepkg -p pkg.conf cmmakepkg -s pkg.cntl

NOTE: There should be one set of configuration and control script files for each DB2 instance.

The Serviceguard package control script (pkg.cntl).

Below are some examples of modifications to the Serviceguard package control script you need to make to customize to your environment.

VOLUME GROUPS

Define the volume groups that are used by the DB2 instance. File systems associated with these volume groups are defined as follows:

VG[0]=/dev/vg0_payroll

For example:

VG[0]=/dev/vg0_payroll

Define the file systems which are used by the DB2 instance.

NOTE: One of these file systems must be the shared file system/logical volume containing the DB2 home configuration information ($DB2_HOME). The name of the instance is used to name the volume groups, logical volumes and file systems. For example,

LV[0]=/dev/vg0_payroll/lvol1 FS[0]=/mnt/payroll

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

Edit the customer_defined_run_cmds function to execute 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

}

Edit the customer_defined_halt_cmds function to execute the toolkit.sh script with the stop option. For example,

function customer_defined_halt_cmds

{

DB2 Package Configuration Example 83