Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

26.2.10 PowerHA preparations

We recommend that you read this subsection if you are using PowerHA as your cluster software.

For details about how to set up a PowerHA environment, see the PowerHA documentation.

Organization of this subsection
(1) Resource group
(2) Volume group registration
(3) Application registration
(4) Service IP label/address registration

(1) Resource group

The unit that PowerHA uses for switching systems is called a resource group. A resource group is a set of resources defined by the user. When you use PowerHA, you must register the following resources as resource groups:

Register resource groups and resources in the Change/Show All Resources and Attributes for a Resource Group window of PowerHA.

Register resources in both the primary and secondary systems.

(2) Volume group registration

Register the shared disk on which the HiRDB file system area was created under Volume Groups in PowerHA.

(3) Application registration

Register HiRDB under Application Controller in PowerHA. Register the shell script that starts HiRDB and the shell script that terminates it.

The shell scripts to be registered are created in advance and stored on the server machines of both the primary and secondary systems. You register the shell script that starts HiRDB in Start Script. You register the shell script that terminates HiRDB in Stop Script.

Examples of these shell scripts are provided below.

(a) Example of a shell script that starts HiRDB

An example of a shell script that starts HiRDB follows. In this example, the user ID of the HiRDB administrator is created as hirdb.

Assign shell script execution privileges to the root user.

[Figure] HiRDB single server configuration

#!/bin/sh -x
su - hirdb -c /* Changed to HiRDB administrator privileges */
PDDIR=/HiRDB_S
PDCONFPATH=/HiRDB_S/conf
LIBPATH=/HiRDB_S/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH PATH LIBPATH
$PDDIR/bin/pdstart

[Figure] HiRDB parallel server configuration

#!/bin/sh -x
su - hirdb -c /* Changed to HiRDB administrator privileges */
PDDIR=/HiRDB_P
PDCONFPATH=/HiRDB_P/conf
LIBPATH=/HiRDB_P/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH PATH LIBPATH
$PDDIR/bin/pdstart -q
(b) Example of a shell script that terminates HiRDB

For the shell script that terminates HiRDB, specify the option to forcibly terminate HiRDB (pdstop -f -q for a HiRDB single server configuration, and pdstop -z -q for a HiRDB parallel server configuration). If this option is not specified, HiRDB waits for pending transactions to finish and for connections to terminate before it terminates. Consequently, system switchovers might take a long time.

An example of a shell script that terminates HiRDB is given below. In this example, the user ID of the HiRDB administrator is created as hirdb.

Assign shell script execution privileges to the root user.

[Figure] HiRDB single server configuration

#!/bin/sh -x
su - hirdb -c /* Changed to HiRDB administrator privileges */
PDDIR=/HiRDB_S
PDCONFPATH=/HiRDB_S/conf
LIBPATH=/HiRDB_S/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH PATH LIBPATH
$PDDIR/bin/pdstop -f -q

[Figure] HiRDB parallel server configuration

#!/bin/sh -x
su - hirdb -c /* Changed to HiRDB administrator privileges */
PDDIR=/HiRDB_P
PDCONFPATH=/HiRDB_P/conf
LIBPATH=/HiRDB_P/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH PATH LIBPATH
$PDDIR/bin/pdstop -z -q

(4) Service IP label/address registration

When the -x option is specified for the pdunit operand of the system common definition, register the specified host name and IP address as Service IP Label/Address. Registration is not required if the -x option is not specified for the pdunit operand of the system common definition.