HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide

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

6.9.2 Preparations for using the system switchover facility (for HA monitor)

This subsection describes the preparations that are required in order to use the HA monitor's system switchover facility. The items described here are applicable to all types of system switchover that are described in 6.9.1 (1) Types of system switchover.

Organization of this subsection
(1) Preparations related to the HA monitor
(2) Hardware-related preparations
(3) Network-related preparations
(4) Preparation of files
(5) How to define Datareplicator when the high-speed system switchover facility is used

(1) Preparations related to the HA monitor

You must use the HA monitor's server definition statement to set up the Datareplicator's operating environment. When linked with HiRDB, Datareplicator can execute system switchover. The following shows a specification example of the server definition statement:

Example of definition when the HA monitor's resource server facility is used
 
      /****  Resource   ****/
      resource alias          REPres                     ,
               group          groupA                     ,
               initial        online                     ,
               disk           /dev/vg00:/dev/vg01        ,
               lan_updown     use                        ;
 
      /****  Replicator   ****/
      server   name           /HAmon/etc/replica.up      ,
               alias          repl                       ,
               acttype        monitor                    ,
               initial        online                     ,
               termcommand    /HAmon/etc/replica.down    ,
               lan_updown     nouse                      ,
               parent         REPres                     ,
               group          groupA                     ;

[Figure]

Example of definition when the HA monitor's resource server facility is not used
 
      /****  Replicator   ****/
      server   name           /HAmon/etc/replica.up      ,
               alias          repl                       ,
               acttype        monitor                    ,
               initial        online                     ,
               termcommand    /HAmon/etc/replica.down    ,
               disk           /dev/vg01                  ,
               lan_updown     use                        ,
               group          groupA                     ;

[Figure]

To achieve source Datareplicator system switchover, the data linkage file is shared with the HiRDB. Therefore, you must adjust the volume layout in the data linkage file as well as the timing of starting HiRDB and Datareplicator.

If your HA monitor version supports the resource server facility, using the HA monitor's resource server facility for the source Datareplicator's system switchover eliminates the need to adjust the start timing.We recommend that you use the resource server facility in order to simplify the configuration of the system switchover environment.

The following describes each operand of the server definition statement that is related to Datareplicator.

(a) Resource server definition

The following describes each operand that is related to the resource server definition.

alias
Specify the identification name for the command to be used with the HA monitor or for the messages to be output.

group
Specify the same server group name as for the HiRDB and Datareplicator so that grouped system switchover is performed with HiRDB and Datareplicator.

initial
Specify the status when the server starts. For the primary system, specify online; for the secondary system, specify standby.

disk
Specify the path name of the volume group of the shared disk unit that contains the files requiring switchover for HiRDB and Datareplicator.
For details about the file to be created on the shared disk unit, see Table 6-18 Preparation of files for using the system switchover facility.

lan_updown
Specify use. This is because the IP address must be changed after system switchover so that communication can be established between the extraction master process and extraction node master process at the source Datareplicator.
Additionally, you must create the LAN status setup files for achieving the above IP address change (server-ID.up and server-ID.down files).
(b) Datareplicator-related definition

The following describes each operand that is related to the Datareplicator definition.

name
Specify the absolute path name of the shell specifying the command for starting Datareplicator. The following shows an example shell specification:
 
sleep 5#                                            1.
su - hirdbdba -c /opt/hirdbds/bin/hdestart 
                2> /tmp/start_log                   2.
#
If you use the resource server facility at the source or target Datareplicator, sleep is not needed.
  1. HiRDB's server definition statement is used to swap disks for the data linkage file that is shared by HiRDB and Datareplicator. Taking into account the time lag before the data linkage file can be referenced after swapping HiRDB systems, set a wait time of some 5-10 seconds before Datareplicator is started.
  2. The shell is executed from the HA monitor by the superuser, but the Datareplicator start command must be executed by the Datareplicator administrator. Therefore, the Datareplicator administrator (hirdbdba in the above example) must start Datareplicator using the su command.
    The start command for the source Datareplicator is different from that for the target Datareplicator:
    Source Datareplicator: /opt/hirdbds/bin/hdestart
    Target Datareplicator: /opt/hirdbds/bin/hdsstart
    Error messages during execution of the start command are output to the standard error output. If the start command is executed within the shell, set up in such a manner that the standard error output is routed to a work file (/tmp/start_log in the above example).

alias
Specify the identification name for the command to be used with the HA monitor or for the messages to be output.

acttype
Specify monitor.

initial
Specify the status when the server starts. For the primary system, specify online; for the secondary system, specify standby.

termcommand
Specify the absolute path name of the shell specifying the command for terminating Datareplicator when the system is to be terminated by the HA monitor's monend command alone or when planned system swapping is to be executed by the monswap command alone.
The following shows an example shell:
 
su  -  hirdbdba  -c  "/opt/hirdbds/bin/hdestop 
               -t  sendterm -w" 2> /tmp/stop_log      1.
 
  1. Execute the hdestop command with -w specified because it is important to ensure that Datareplicator will terminate completely. The shell is executed from the HA monitor by the superuser, but the Datareplicator termination command must be executed by the Datareplicator administrator. Therefore, the Datareplicator administrator (hirdbdba in the above example) must terminate Datareplicator using the su command.
    The termination command for the source Datareplicator is different from that for the target Datareplicator:
    Source Datareplicator: /opt/hirdbds/bin/hdestop -t sendterm -w#
    Target Datareplicator: /opt/hirdbds/bin/hdsstop -t force -w#
    #: For the -t sendterm and -t force options, change the specification as appropriate to the purpose, such as by specifying -t immediate for planned system switchover.
    Error messages during execution of the stop command are output to the standard error output. If the stop command is executed within the shell, set up in such a manner that the standard error output is routed to a work file (/tmp/stop_log in the above example).

disk
Specify the file to be created on the shared disk unit. For details about the file to be created on the shared disk unit, see Table 6-18 Preparation of files for using the system switchover facility.
If the resource server facility is not used, specify the path name of the volume group of the shared disk unit that contains the files requiring switchover. Because the disk containing the data linkage file is also accessed from the HiRDB system, specify it in the disk operand of the server definition statement for the HiRDB system.
If you use the resource server facility, there is no need to specify this information because it has been specified in the resource server definition.

lan_updown
The specification is the same for the source and target systems.
Source system
Specify use. This is because the IP address must be changed after system switchover so that communication can be established between the extraction master process and extraction node master process.
Additionally, you must create the LAN status setup files for achieving the above IP address change (server-ID.up and server-ID.down files). Specify in the LAN status setup files the host name subject to IP address switchover control that was specified in the node_host operand in the Datareplicator's extraction system definition.
Target system
Specify use. This is because the IP address must be changed after system switchover so that communication can be re-established from the source Datareplicator.
Additionally, you must create the LAN status setup files for achieving the above IP address change (server-ID.up and server-ID.down files).

parent
Specify the identification name of the resource server (value specified in the alias operand).

group
Specify the same server group name as for the HiRDB system so that linked system switchover is achieved with the HiRDB system. There is no need to specify the switchover type because Datareplicator is in the monitor mode.

(2) Hardware-related preparations

To use the system switchover facility, you must allocate the Datareplicator files to a shared disk unit. For details about the Datareplicator's files that need to be allocated, see Table 6-18 Preparation of files for using the system switchover facility.

Create the files listed in Table 6-18 Preparation of files for using the system switchover facility on an external hard disk (character special files) that is shared by the primary and secondary systems, and then define the files so that they can be accessed from both Datareplicators using the same path. You can use a Datareplicator file system area as the shared disk unit.

(3) Network-related preparations

It is necessary for the following networks to be configured in such a manner that they inherit IP addresses:

(4) Preparation of files

To use the system switchover facility, you must allocate some files to the shared disk unit and copy in advance some other files from the primary system to the secondary system without changing the directory names.

For a file that is allocated to the shared disk unit, you need to create a symbolic link so that it can be referenced from the HiRDB Datareplicators on both the primary and the secondary systems using the same path name. For details about how to create a symbolic link, see 4.6.2 Preparation of the files used with the source Datareplicator and 4.7.2 Preparation of the files used with the target Datareplicator.

The following table shows the file-related preparations that are required when the system switchover facility is used.

Table 6-18 Preparation of files for using the system switchover facility

Classification Filename Shared disk unit Same directory name?
Source Datareplicator Extraction system definition file N/A Yes
Extraction environment definition file N/A Yes
Transmission environment definition files N/A Yes
Extraction definition file# N/A N/A
Duplexing definition file N/A Yes
Duplexing control file N/A Yes
Extraction definition preprocessing file D N/A
Extraction information queue files D N/A
Extraction master status file D N/A
Extraction server status file D N/A
Extraction master error information files N/A N/A
Extraction node master error information files N/A N/A
Extraction master trace files N/A N/A
Extraction node master trace files N/A N/A
Data linkage file H N/A
Command log file N/A N/A
Target Datareplicator Import system definition file N/A Yes
Import environment definition files N/A Yes
Import definition files N/A Yes
Duplexing definition file N/A Yes
Duplexing control file N/A Yes
Import information queue files D N/A
Import status files D N/A
Import master status file D N/A
Import error information files N/A N/A
Import trace files N/A N/A
Unimported information files N/A N/A
Command log files N/A N/A
SAM files N/A Yes
Update information definition file N/A Yes
Unextracted data storage file N/A Yes
User-created mapping table for converting character codes N/A Yes
Recovery information file N/A N/A

D: The file must be allocated to the shared disk unit. The file must be allocated to a volume group on the shared disk unit that can be swapped when system switchover occurs on the HiRDB Datareplicator. Because the switchover timing is different, the file must be allocated to a different volume group than that for the file shown as H. The allocated volume group must be set by the HA monitor's server support environment setup so that it can be swapped when system switchover occurs on the HiRDB Datareplicator.

H: The file must be allocated to a volume group on the shared disk unit that can be swapped when system switchover occurs on the HiRDB Datareplicator. Because the switchover timing is different, the file must be allocated to a different volume group than that for the file shown as D. However, if the resource server facility is used, this file can be allocated to the same volume group as that for the file shown as D. The allocated volume group must be set by the HA monitor's server support environment setup so that it can be swapped when system switchover occurs on the HiRDB Datareplicator.

Yes: The file must be allocated to the shared disk unit, or the file must be copied in advance from the primary system to the secondary system under the same directory name. If the file contents are updated, the updated file must also be copied to the secondary machine in advance.

N/A: Not applicable.

#: The file must be copied from the primary system to the secondary system in advance.

(5) How to define Datareplicator when the high-speed system switchover facility is used

For the source Datareplicator, you must allocate a host name that inherits the IP address for communication from the extraction master process to the extraction node master process. This host name must be different from the host name that is used by HiRDB.

You must specify this host name for the source Datareplicator that inherits IP addresses in the node_host operand of the extraction system definition in such a manner that it is associated with the host name specified in the -x operand of the pdunit command or the pdstart command in the source HiRDB's system common definition.

The following figure shows the relationship between the source system's server and main processes.

Figure 6-29 Relationship between the source system's server and main processes

[Figure]

Define the correspondence between the host name specified in the -x operand of the pdunit command or the pdstart command in the source HiRDB's system common definition and the host name that starts the extraction node master process. The extraction master process connects to the host that starts the extraction node master process.

[Figure]