Nonstop Database, HiRDB Version 9 System Operation Guide
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.
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.
Register the shared disk on which the HiRDB file system area was created under Volume Groups in PowerHA.
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.
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.
#!/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 |
#!/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 |
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.
#!/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 |
#!/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 |
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.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.