HP Serviceguard Linux Contributed Toolkit Suite A.04.02.01 User Guide (696979-001, June 2012)

For example:
function customer_defined_halt_cmds
{
# Stop the PostgreSQL Database Server.
${SGCONF}/pkg/postgresql/toolkit.sh stop
test_return 51
}
8. Edit the PostgreSQL the toolkit configuration file hapgsql.conf.
9. Copy the package directory to the other nodes in the cluster.
For example, change to the parent directory of the package directory and enter the following
command:
# rcp -r p ${SGCONF}/pkg/postgresql photon4:$PWD/
10. Validate the configuration using the cmcheckconf command:
# cmcheckconf -P pgsql_pkg.conf
11. Add the package to the Serviceguard environment using the cmapplyconf command, if the
cmcheckconf command does not report any errors:
# cmapplyconf -P pgsql_pkg.conf
12. Enable package switching for the PostgreSQL toolkit package using:
# cmmodpkg -e -n node1 -n node2 pgsql_pkg
# cmmodpkg -e pgsql_pkg
13. Start the package using the cmrunpkg command.
# cmrunpkg pgsql_pkg
Configuring modular PostgreSQL toolkit packages
To configure modular PostgreSQL toolkit packages:
1. Create a directory for the package on all the cluster nodes using the following command:
# mkdir ${SGCONF}/pkg/pgsql
2. cd to the package directory.
3. Create the package configuration and control templates using the cmmakepkg command:
# cmmakepkg m tkit/pgsql/pgsql pgsql_pkg.conf
4. Edit the following attributes manually in the package configuration file:
DescriptionAttribute
This directory holds the toolkit configuration file. This
parameter directs cmapplyconf to generate the
TKIT_DIR
hapgsql.conf file under this directory. To put the
toolkit into maintenance mode, create pgsql.debug
file under this directory. This is synonymous with the
package directory acronym.
This is the path of the directory where database files
resides. It must be unique across all the PostgreSQL
toolkit packages.
DATA_DIRECTORY
This is the path of the PostgreSQL log file. The default
value is /var/lib/pgsql/pgsql1.log. Ensure that
LOG_FILE
the name is unique across all the PostgreSQL toolkit
Packages.
32 PostgreSQL Toolkit