Creating Serviceguard package using Modular method.

Follow the steps below to create Serviceguard package using Modular method:

1.Create a directory for the package.

#mkdir /etc/cmcluster/pkg/mysql_pkg/

2.Copy the toolkit template and script files from mysql directory.

#cd /etc/cmcluster/pkg/mysql_pkg/ #cp /opt/cmcluster/toolkit/mysql/* ./

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

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

4.Edit the package configuration file.

NOTE: Mysql toolkit configuration parameters in the package configuration file have been prefixed by ecmt/mysql/mysql when used in Serviceguard A.11.19.00.

For Example:

/etc/cmcluster/pkg/mysql_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 Example:

PACKAGE_NAME mysql NODE_NAME node1 NODE_NAME node2

Set the TKIT_DIR variable as the path of <package_directory>. For example, TKIT_DIR /etc/cmcluster/pkg/pkg01.

5.Use cmcheckconf command to check for the validity of the configuration specified. For Example:

#cmcheckconf -P pkg.conf

6.If the cmcheckconf command does not report any errors, use the cmapplyconf command to add the package into Serviceguard environment.

For Example:

#cmapplyconf -P pkg.conf

Applying the Configuration and Running the Package

After the database is set upon the shared storage, configure the toolkit and package.

1.Create a directory in the cmcluster directory for each package (for example, /etc/ cmcluster/pkg/MySQL1).

2.Copy the toolkit files from /opt/cmcluster/toolkit/mysql to the package directory (/etc/cmcluster/pkg/MySQL1), and change directory to the package directory.

3.Configure hamysql.conf for your unique configuration as described in the section entitled “Toolkit Configuration File (hamysql.conf)” (page 91) of this document.

4.In the package directory, generate the package configuration and control templates with cmmakepkg command.

For example:

cmmakepkg -p MySQL1.conf (configuration template)

For example:

94 Using MySQL Toolkit in a HP Serviceguard Cluster