HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
(1) Data linkage system modes when the standby-less system switchover (effects distributed) facility is used
If the source HiRDB employs a standby-less system switchover (effects distributed) configuration, the system is switched over for each back-end server. Therefore, settings for achieving system switchover for each back-end server are also needed for the source Datareplicator.
The following figure shows the data linkage system modes when the standby-less system switchover (effects distributed) facility is used.
Figure 6-32 Data linkage system modes when the standby-less system switchover (effects distributed) facility is used
![[Figure]](FIGURE/RZ06S270.GIF)
(2) Preparations for using the standby-less system switchover (effects distributed) facility
This subsection describes the preparations that are required in order to use the standby-less system switchover (effects distributed) facility (this subsection covers only those items that are different from when the normal system switchover facility is used). For details about the preparations required in order to use the normal system switchover facility, see 6.9.2 Preparations for using the system switchover facility (for HA monitor).
(a) Preparations related to the HA monitor
In the same manner as when normal system switchover is performed, use the HA monitor's server definition statement to define the Datareplicator operating environment. Because standby-less system switchover (effects distributed) takes place for each back-end server at the source HiRDB, you must also specify a Datareplicator definition for each of the HiRDB's back-end servers so that system switchover is linked with HiRDB.
For details, see 6.9.2 Preparations for using the system switchover facility (for HA monitor).
(b) Allocating the source Datareplicator's host names
When you use the standby-less system switchover (effects distributed) facility, allocate host names as follows:
- Host where the extraction master process is run:
- Allocate a host name that inherits IP addresses. This must be a new host name for Datareplicator that is allocated separately from the host name used by the source HiRDB.
- Host where the extraction node master process is run:
- There is no need to allocate a new host name for Datareplicator because the host name without IP address inheritance that is used by HiRDB is also used by Datareplicator.
(c) Creating Datareplicator startup and termination shells
Terminate Datareplicator on the primary HiRDB and create a shell for starting Datareplicator on the standby HiRDB. The following shows an example of such a shell.
- For the unit that contains the system manager
sleep 5#
su -user-name -c "/opt/hirdbds/bin/hdestart_n" 2> /tmp/start_log |
- For a unit that does not contain the system manager
sleep 5#
su -user-name -c "/opt/hirdbds/bin/hdestart_n -b BES-name -x host-name -n service-name " 2> /tmp/start_log |
- Note:
- Error messages are output to the standard error output during execution of the start command. If you execute the start command within the shell, specify settings so that the standard error output is routed to a work file (in the above example, /tmp/start_log).
- #
- Adjust sleep in such a manner that Datareplicator is started after the volume containing the data linkage file is activated (after HiRDB has started). However, if you are simplifying the source Datareplicator operation, sleep is not needed. For details about simplifying the operation of the source Datareplicator, see 6.9.6(3) Simplifying the operation of the source Datareplicator (applicable only when HA monitor is used).
- Example of termination shell
- For the unit that contains the system manager
| su -user-name -c "/opt/hirdbds/bin/hdestop_n -w" 2> /tmp/stop_log |
- For a unit that does not contains the system manager
| su -user-name -c "/opt/hirdbds/bin/hdestop_n -b BES-name -t sendterm -c continue -w" 2> /tmp/stop_log |
- Note:
- Error messages are output to the standard error output during execution of the termination command. If you execute the termination command within the shell, specify settings so that the standard error output is routed to a work file (in the above example, /tmp/stop_log).
(d) Extraction system definition
To use the standby-less system switchover (effects distributed) facility, you must set the following operands in the extraction system definition:
- nodecontrol=server
- When the standby-less system switchover (effects distributed) facility is used, HiRDB performs system switchover for each back-end server. Therefore, the source Datareplicator must also be set up to perform system switchover for each back-end server in the same manner as in HiRDB.
- node_connection_accept=true
- Specifies that a connection request from the extraction node master process is to be accepted, and that connection is to be re-established between the extraction master process and the extraction node master process during system switchover.
- connection_accept_hostname=host-name-accepting-connection-request-from-extraction-node-master-process
- Specifies the host name with IP address inheritance that has been allocated to the server machine where the extraction master process is run in order to accept a connection request from the extraction node master process.
- connection_accept_service=service-name-accepting-connection-request-from-extraction-node-master-process
- Specifies the service name for accepting a connection request from the extraction node master process.
- connection_accept_waittime=extraction-node-master-process-connection-request-wait-time
- Specifies the amount of time to wait for the extraction master process to accept a reconnection request from the extraction node master process in the event all extraction node master processes are disconnected.
- connection_retry_time=extraction-node-master-process-reconnection-processing-time
- Specifies the amount of time to allot for the extraction node master process to reconnect to the extraction master process in the event that the extraction master process is disconnected.
(3) Simplifying the operation of the source Datareplicator (applicable only when HA monitor is used)
If both of the following conditions are satisfied, you can use the user command interface provided by the HA monitor:
- The cluster software in use is the HA monitor.
- The source HiRDB uses the standby-less system switchover (effects distributed) facility.
The user command interface provided by the HA monitor can simplify the preparation and handling of system switchover, because the source Datareplicator's system switchover control is included in HiRDB's system switchover control.
The following describes the preparations and handling of this simplification.
(a) Preparations
To prepare for system switchover:
- Create a user command.
Create a user command for the startup and termination of Datareplicator that occur during HiRDB system switchover.
For an example of a user command, see Example of a user command below.
- Register the user command for HA monitor environment settings.
Register the created user command into the usrcommand operand of the HA monitor environment settings so that the user command will execute during HiRDB system switchover.
- Allocate shared resources.
- Allocating a host name with IP address inheritance
The resources to be allocated depend on the active process and the host name used by HiRDB. The following table shows whether shared resources are to be allocated:
| Host name used by HiRDB |
Process running at the host |
| Extraction master process |
Extraction node master process# |
| IP addresses are inherited |
N |
N |
| IP addresses are not inherited |
Y |
N |
- Legend:
- Y: A new host name that inherits IP addresses must be allocated for Datareplicator.
- N: There is no need to allocate a new host name that inherits IP addresses.
- #
- For the network between the source and target Datareplicators, a host name that inherits IP addresses must be allocated for the target Datareplicator in the same manner as when the operation is not simplified.
- Allocating shared volumes
Not only the data linkage files but also all Datareplicator-related files must be allocated to the shared volumes that can be switched over by HiRDB's system switchover control.
- Create the Datareplicator startup and termination shells.
To simplify operation, you must execute the Datareplicator startup and termination shells from the user command. For details about creating shells, see 6.9.6(2)(c) Creating Datareplicator startup and termination shells.
- Create the cluster software definition.
Because Datareplicator's switchover control is achieved by the user command during HiRDB system switchover, there is no need to create an HA monitor server definition for Datareplicator's system switchover.
- Specify the Datareplicator definition.
Same as when the operation is not simplified.
- Example of a user command
- Adjust the value for each pattern in the case command according to the server definition for the HA monitor in use. Also adjust the number of patterns according to the number of HiRDB servers in use.
- Change the names of the Datareplicator startup and termination shells to the actual shell names that will be used (commands ending with _sh are the Datareplicator startup and termination shells).
- The following shows an example of a user command:
#!/bin/sh
HA_SERVER_ID=$2
SERVER_KIND=$4
SERVER_STATUS=$5
START_PARAM=$6
##############################################################
# Convert from HA monitor's server name to HiRDB's server name #
##############################################################
case "$HA_SERVER_ID" in
"REPmngr")
HiRDB_SERVER_ID="MST"
;;
"REPb11")
HiRDB_SERVER_ID="bes11"
;;
"REPb12")
HiRDB_SERVER_ID="bes12"
;;
"REPb21")
HiRDB_SERVER_ID="bes21"
;;
"REPb22")
HiRDB_SERVER_ID="bes22"
;;
"REPb31")
HiRDB_SERVER_ID="bes31"
;;
"REPb32")
HiRDB_SERVER_ID="bes32"
;;
*)
exit 0
;;
esac
##############################################################
# Issue HiRDB Datareplicator command #
##############################################################
if [ $SERVER_KIND = "online" ]
then
case "$SERVER_STATUS" in
"-s")
#####################################################
# CASE : online : Normal Start #
#####################################################
if [ $START_PARAM = "end" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StartMST_sh
else
/HiRDBDS/SH/StartNMT_sh $HiRDB_SERVER_ID "initial"
fi
fi
;;
"-e")
#####################################################
# CASE : online : Normal End #
#####################################################
if [ $START_PARAM = "start" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StopMST_sh
else
/HiRDBDS/SH/StopNMT_sh $HiRDB_SERVER_ID "initial"
fi
fi
;;
"-p")
#####################################################
# CASE : online : Planned End #
#####################################################
if [ $START_PARAM = "start" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StopMST_sh
else
/HiRDBDS/SH/StopNMT_sh $HiRDB_SERVER_ID "initial"
fi
fi
;;
"-a")
#####################################################
# CASE : online : Switch by Server down #
#####################################################
if [ $START_PARAM = "start" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StopMST_sh
else
/HiRDBDS/SH/StopNMT_sh $HiRDB_SERVER_ID "continue" "-t sendterm"
fi
fi
;;
"-w")
#####################################################
# CASE : online : Switch by Planned #
#####################################################
if [ $START_PARAM = "start" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StopMST_sh
else
/HiRDBDS/SH/StopNMT_sh $HiRDB_SERVER_ID "continue"
fi
fi
;;
esac
else
case "$SERVER_STATUS" in
"-a")
#####################################################
# CASE : standby : Switch by Server down #
#####################################################
if [ $START_PARAM = "end" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StartMST_sh
else
/HiRDBDS/SH/StartNMT_sh $HiRDB_SERVER_ID "continue"
fi
fi
;;
"-w")
#####################################################
# CASE : standby : Switch by Planned #
#####################################################
if [ $START_PARAM = "end" ]
then
if [ $HiRDB_SERVER_ID = "MST" ]
then
/HiRDBDS/SH/StartMST_sh
else
/HiRDBDS/SH/StartNMT_sh $HiRDB_SERVER_ID "continue"
fi
fi
;;
esac
fi
(b) Operation
- 1. Initializing the source Datareplicator
- The following describes how to initialize the source Datareplicator:
- Terminate normally the source HiRDB subject to extraction processing.
- Terminate the HA monitor.
- In the HA monitor environment settings, delete the specification of the Datareplicator control command from the usrcommand operand.
- Start the HA monitor.
- Start the source HiRDB in the unlinked mode (pd_rpl_init_start=N).
- Initialize the source Datareplicator environment (hdestart -i command).
- Create the extraction definition preprocessing file (hdeprep command).
- Terminate the source HiRDB normally.
- Terminate the HA monitor.
- In the HA monitor environment settings, register the Datareplicator control command in the usrcommand operand.
- Start the HA monitor.
- Start the source HiRDB in the linked mode (pd_rpl_init_start=Y). The source Datareplicator is started at the same time HiRDB is started.
- 2. Starting and terminating the source Datareplicator
- No operation is needed, because the source Datareplicator's startup and termination are linked to startup and termination of the source HiRDB.
- 3. Starting the source Datareplicator while HiRDB is terminated
- If the source HiRDB cannot be started for a reason such as a log file that has become filled with unextracted log information, you can use the following procedure to start the source Datareplicator only:
- Manually activate the shared resources in the system manager unit that are required to start Datareplicator.
- Start the extraction master process on the system manager unit (hdestart_n command).
- Manually activate the shared resources that are required for the extraction node master process that is to be started.
- At the back-end server unit, start the extraction node master process (hdestart_n -b server-name).
All rights reserved. Copyright (C) 2007, 2013, Hitachi, Ltd.