HP Enterprise Cluster Master Toolkit User Guide (5900-2131, December 2011)

#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 or later.
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/mysql_pkg.
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:
cmmakepkg -s MySQL1.cntl (control template)
5. Using any editor modify the package templates with your specific information, as described
in the preceding section“Package Configuration File and Control Script (page 92) of this
chapter.
6. Change the owner and group of the package directory to the "mysql" user.
For Example:
chown mysql:mysql /etc/cmcluster/pkg/MySQL1
94 Using MySQL Toolkit in a HP Serviceguard Cluster