Nonstop Database, HiRDB Version 9 System Operation Guide
We recommend that you read this subsection if you are using LifeKeeper as your cluster software.
You must create these resources in the order described below, and HiRDB must be stopped when you create them.
For details about how to set up a LifeKeeper environment, see the LifeKeeper documentation.
Create IP resources and set up a virtual IP address (HiRDB alias IP address) in LifeKeeper. You need to create IP resources only if the IP address is to be inherited after a system switchover.
Set the host name specified in the -x option of the pdunit operand of the system common definition as the virtual IP address.
To set up a virtual IP address, from the GUI window of LifeKeeper, choose Edit, Server, Create Resource Hierarchy, and then IP. In the window that opens, select or specify the items listed in the following table:
Item | Value to be selected or specified |
---|---|
Switchback Type | Select intelligent. |
Server | Specify the host name of the primary system |
IP Resource | Specify the host name specified in the -x option of the pdunit operand or an IP address. |
Netmask | Specify the host name specified in the -x option of the pdunit operand or the netmask of an IP address. |
Network Interface | Specify the interface to which the virtual IP address is to be assigned. |
IP Resource Tag | Specify an IP resource name for managing LifeKeeper. |
Once you have completed the setup for the primary system, set up the secondary system. Set up the items described in the above table for the secondary system.
Create file system resources to set up a shared disk in LifeKeeper. You need to create file system resources if you create HiRDB file system areas in regular files.
Perform this setup after you have verified that a shared disk has been allocated to the primary system.
To set up a shared disk, from the GUI window of LifeKeeper, choose Edit, Server, Create Resource Hierarchy, and then File System. In the window that opens, select or specify the items listed in the following table:
Item | Value to be selected or specified |
---|---|
Switchback Type | Select intelligent. |
Server | Specify the host name of the primary system |
Mount Point | Select the mount point of the shared disk. |
Root Tag | Specify a name for managing LifeKeeper. |
Once you have completed the setup for the primary system, set up the secondary system. Set up the items described in the above table for the secondary system.
Create raw device resources to set up a shared disk in LifeKeeper. You need to create raw device resources if you are creating HiRDB file system areas in character special files.
To set up a shared disk, from the GUI window of LifeKeeper, choose Edit, Server, Create Resource Hierarchy, and then Raw Device. In the window that opens, select or specify the items listed in the following table:
Item | Value to be selected or specified |
---|---|
Switchback Type | Select intelligent. |
Server | Specify the host name of the primary system. |
Raw Partition | Select a partition for the shared disk. |
Root Tag | Specify a name for managing LifeKeeper. |
Once you have completed the setup for the primary system, set up the secondary system. Set up the items described in the above table for the secondary system.
Create Generic ARK resources to set up HiRDB in LifeKeeper, and create resources for HiRDB (or a unit for a HiRDB parallel server configuration).
Prepare the scripts described below. After you have created a shell script for HiRDB (or a unit for a HiRDB parallel server configuration), specify the path of the shell script for HiRDB (or unit) in the script provided by LifeKeeper.
Assign shell script execution permission to the HiRDB administrator or the root user. Note that these scripts must be stored in both the primary and secondary systems.
Examples of these scripts are listed and explained below. In these examples, hirdb is used as the user ID of the HiRDB administrator, and the script timeout is set to 600 (seconds).
: ####################################### # Protection-target parameter setup (user definition) # ####################################### : APP_START="su - hirdb -c /HiRDB_S/conf/pdstart.sh" # Start command.............1 APP_START_ARGS="" # Start command argument APP_STOP="su - hirdb -c /HiRDB_S/conf/pdstop.sh" # Stop command.............2 APP_STOP_ARGS="" # Stop command argument APP_FORCE_STOP="" # Forced termination command APP_FORCE_STOP_ARGS="" # Forced termination command argument APP_CHECK[0]="/HiRDB_S/conf/pdls.sh" # Operation check command 1........3 APP_CHECK_ARGS[0]="" # Argument of the above command # APP_CHECK[1]="" # Operation check command 2 # APP_CHECK_ARGS[1]="" # Argument of the above command #################### # Parameter initialization # #################### : DEFAULT_TIMEOUT=600 # Script timeout value START_SUCCESS_CODE=0 # Return value for the start status of the operation check command STOP_SUCCESS_CODE=12 # Return value for the stop status of the operation check command CHECK_RETRY_CODE=4 # Return value indicating the need # to retry the operation check command : |
#!/bin/sh -x PDDIR=/HiRDB_S PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdstart |
#!/bin/sh -x PDDIR=/HiRDB_S PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdstop -f -q...................................1 |
#!/bin/sh -x PDDIR=/HiRDB_S PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdls -d ust |
: ####################################### # Protection-target parameter setup (user definition) # ####################################### : APP_START="su - hirdb -c /HiRDB_P/conf/pdstart.sh" # Start command.............1 APP_START_ARGS="" # Start command argument APP_STOP="su - hirdb -c /HiRDB_P/conf/pdstop.sh" # Stop command.............2 APP_STOP_ARGS="" # Stop command argument APP_FORCE_STOP="" # Forced termination command APP_FORCE_STOP_ARGS="" # Forced termination command argument APP_CHECK[0]="" # Operation check command 1........3 APP_CHECK_ARGS[0]="" # Argument of the above command # APP_CHECK[1]="" # Operation check command 2 # APP_CHECK_ARGS[1]="" # Argument of the above command #################### # Parameter initialization # #################### : DEFAULT_TIMEOUT=600 # Script timeout value START_SUCCESS_CODE=0 # Return value for the start status of the operation check command STOP_SUCCESS_CODE=12 # Return value for the stop status of the operation check command CHECK_RETRY_CODE=4 # Return value indicating the need # to retry the operation check command : ############ # Function # ############ # Startup processing.............................................................4 APP_start() { echo "$(date +'[%Y/%m/%d %H:%M:%S]') : $TAG starting on $HOSTNAME" >> $lklog $APP_START $APP_START_ARGS >> $lklog 2>&1 & } : ################## # Main (restore) # ################## : # Start.................................................................5 APP_start exit 0 |
: ####################################### # Protection-target parameter setup (user definition) # ####################################### : APP_START="su - hirdb -c /HiRDB_P/conf/pdstart.sh" # Start command.............1 APP_START_ARGS="" # Start command argument APP_STOP="su - hirdb -c /HiRDB_P/conf/pdstop.sh" # Stop command.............2 APP_STOP_ARGS="" # Stop command argument APP_FORCE_STOP="" # Forced termination command APP_FORCE_STOP_ARGS="" # Forced termination command argument APP_CHECK[0]="/HiRDB_P/conf/pdls.sh" # Operation check command 1........3 APP_CHECK_ARGS[0]="" # Argument of the above command # APP_CHECK[1]="" # Operation check command 2 # APP_CHECK_ARGS[1]="" # Argument of the above command #################### # Parameter initialization # #################### : DEFAULT_TIMEOUT=600 # Script timeout value START_SUCCESS_CODE=0 # Return value for the start status of the operation check command STOP_SUCCESS_CODE=12 # Return value for the stop status of the operation check command CHECK_RETRY_CODE=4 # Return value indicating the need # to retry the operation check command : |
#!/bin/sh -x PDDIR=/HiRDB_P PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdstart -q &....................................1 |
#!/bin/sh -x PDDIR=/HiRDB_P PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdstop -z -q....................................1 |
#!/bin/sh -x PDDIR=/HiRDB_P PDCONFPATH=${PDDIR}/conf LD_LIBRARY_PATH=${PDDIR}/lib:${LD_LIBRARY_PATH} PATH=${PATH}:${PDDIR}/bin export PDDIR PDCONFPATH PATH LD_LIBRARY_PATH $PDDIR/bin/pdls -d ust |
Register scripts and create resources for HiRDB (or a unit for a HiRDB parallel server configuration).
To register scripts, from the GUI window of LifeKeeper, choose Edit, Server, Create Resource Hierarchy, and then Generic Application. In the window that opens, select or specify the items listed in the following table:
Item | Value to be selected or specified |
---|---|
Switchback Type | Select intelligent. |
Server | Specify the host name of the primary system |
Restore Script | Specify the storage location of the Start (Restore) script. |
Remove Script | Specify the storage location of the Stop (Remove) script. |
QuickCheck Script | Do not specify this item. |
Application Info | Do not specify this item. |
Bring Resource In Service | Select No. |
Resource Tag | Specify a resource name for managing LifeKeeper. |
After you have completed the setup for the primary system, the screen will shift to the Pre-Extend Wizard window for setting up the secondary system. However, choose Cancel and use the GUI window of LifeKeeper to verify that HiRDB resources are set up for the primary system. If a HiRDB parallel server configuration contains multiple units, register scripts for each unit and verify that resources have been created for all units.
After completing the above steps, right-click the resource icon of HiRDB (or unit) to display a menu, and choose In Service to start HiRDB (or unit). After HiRDB (or unit) startup has finished, verify that the resource of HiRDB (or unit) has become enabled on the GUI window. Then, choose Extend Resource Hierarchy to set up the secondary system.
Set up a hierarchy for the resources you created.
To set up the resource hierarchy, right-click the resource icon of HiRDB (or a unit for a HiRDB parallel server configuration) to display a menu, and then choose Create Dependency. Set up the parent resources and child resources as follows:
Parent resources
Child resources
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.