25.6.2 server definition statement
(1) acttype operand
To operate the system switchover facility in the server mode, specify server in this operand. To operate in the monitor mode, specify monitor in this operand.
(2) switchtype operand (applicable to the server mode only)
Consider specifying this operand when operating the system switchover facility in the server mode. You cannot specify this operand when operating in the monitor mode. Specify in this operand the processing to be performed when a server failure is detected.
- switch:
- When HiRDB (or unit for a HiRDB/Parallel Server) terminates abnormally, system switchover is to be performed and HiRDB is to restart on the switchover destination system.
- For the standby-less system switchover (1:1) facility, it is recommended that you specify switch in the server definition statement for the alternate portion created in the alternate BES unit. When switch is specified, the system is switched from the alternate portion to the normal BES unit, if an error occurs in the alternate BES unit while alternating units; as a result, the load on the alternate BES unit can be reduced after it restarts.
- For the standby-less system switchover (effects distributed) facility, it is advisable to specify switch in the server definition statement for the guest BES. When switch is specified, the guest BES switches to another unit if an error occurs in the unit in which the guest BES is running; as a result, the load on the unit can be distributed after it restarts.
- restart:
- HiRDB (or unit for a HiRDB/Parallel Server) is to be restarted on the system resulting in an error. Only if HiRDB cannot be restarted on the system resulting in the error is system switchover to occur and HiRDB to be restarted on the switchover destination system (system switchover is reported by output of the KFPS00715-E message).
- For the standby-less system switchover (1:1) facility, it is not recommended that you not specify restart in the server definition statement for the alternate portion created in the alternate BES unit. When restart is specified, the alternate BES unit continues to assume the alternate processes of the normal BES unit when an error occurs in the alternate BES unit while alternating units; as a result, the load on the alternate BES unit is not reduced after it restarts.
- For the standby-less system switchover (effects distributed) facility, it is not recommended that you specify restart in the server definition statement for the guest BES. When restart is specified, the guest BES continues processing, if an error occurs in the unit in which the guest BES is running after the unit restarts; as a result, the load on the unit cannot be distributed after it restarts.
- manual:
- The systems are not to be switched automatically even if HiRDB (or unit for a HiRDB/Parallel Server) cannot be restarted.
- Hint
- When you use the standby-less system switchover (1:1) facility with a mutual alternating configuration, specify the same value in the switchtype operand of the alternate BES unit and the alternate portion.
- When you use the standby-less system switchover (effects distributed) facility, specify the same value in the switchtype operand of all servers in the HA group.
(3) name operand
- Server mode
- In the case of the standby system switchover facility, specify the HiRDB directory name using an absolute path name. In the case of a HiRDB/Parallel Server, specify the HiRDB directory name of the applicable unit using an absolute path name.
- In the case of the standby-less system switchover (1:1) facility, specify a HiRDB identifier (value specified in the pd_system_id operand) and unit identifier (value specified in the pd_unit_id operand) of a normal BES unit, separated by a slash (/). Specify as shown below if the HiRDB identifier is DB01 and the unit identifier of the normal BES unit is UNT1:
"DB01/UNT1"
- In the case of the standby-less system switchover (effects distributed) facility, specify a HiRDB identifier and server identifier, separated by a slash (/). Specify as shown below if the HiRDB identifier is DB01 and the server identifier is BES1:
"DB01/BES1"
- Monitor mode
- Specify a command (shell) for starting HiRDB (or unit for a HiRDB/Parallel Server) using an absolute path name. If the environment variables inherited from HA monitor are not appropriate for use by the HiRDB start command, HiRDB will not function properly. Use a user command (shell) to change the execution environment, then issue the following commands:
- $PDDIR/bin/pdstart (for a HiRDB/Single Server)
- $PDDIR/bin/pdstart -q* (for a HiRDB/Parallel Server)
- * This command starts a unit in the HiRDB/Parallel Server when using the system switchover facility.
- The following example shows how to create a user command (shell) when using a HiRDB/Single Server.
- Example:
PDDIR=/HiRDB_S
PATH=/bin:/usr/bin:/usr/bin/ucb:/$PDDIR/bin
PDCONFPATH=$PDDIR/conf
SHLIB_PATH=$PDDIR/lib
export PATH PDDIR PDCONFPATH SHLIB_PATH
$PDDIR/bin/pdstart
(4) termcommand operand (applicable to the monitor mode only)
Consider specifying this operand when operating the system switchover facility in the monitor mode. You cannot specify this operand when operating in the server mode. In the following cases, specify a command (shell) for terminating HiRDB (or unit for a HiRDB/Parallel Server) using an absolute path name:
- When performing grouped system switchover
- When terminating* HiRDB by issuing only the monend command of HA monitor or performing a planned system switchover of HiRDB by issuing only the monswap command
- * This applies when forcible termination is used. For normal termination, use the pdstop command to terminate HiRDB and then execute the monend command.
If the environment variables inherited from HA monitor are not appropriate for use by the HiRDB termination command, HiRDB will not function properly. Use a user command (shell) to change the execution environment, then issue the following commands:
- $PDDIR/bin/pdstop or $PDDIR/bin/pdstop -f -q: For a HiRDB/Single Server
- $PDDIR/bin/pdstop -z -q: For a HiRDB/Parallel Server
When this command is executed, RDAREAs on a shared disk may go into error shutdown. If this occurs, recover the RDAREAs on the shared disk by executing the database recovery utility (pdcopy command).
The following example shows how to create a user command (shell) when using a HiRDB/Single Server:
- Example:
PDDIR=/HiRDB_S
PATH=/bin:/usr/bin:/usr/ucb:/$PDDIR/bin
PDCONFPATH=$PDDIR/conf
SHLIB_PATH=$PDDIR/lib
export PATH PDDIR PDCONFPATH SHLIB_PATH
$PDDIR/bin/pdstop
- Reference note
- If this operand is specified and HA monitor's monswap command is entered during HiRDB termination processing, the pdstop command results in an error (pdstop was entered while HiRDB was stopping). No error message is output at this time, but this is an actual error.
- Even if you define a command (in the pd_ha_restart_failure operand) that is to execute when restart fails, the pdstop command results in an error similar to the above case.
(5) alias operand
Specify an identifying name that is unique within the system to which HA monitor is applied. You must specify the same identifying name in the primary and secondary systems.
For the standby-less system switchover facility, it is recommended that the unit identifier be specified. For the standby-less system switchover (1:1) facility, it is recommended that the unit identifier of the normal BES unit be specified. For the standby-less system switchover (effects distributed) facility, it is recommended that the server identifier of the server subject to system switchover be specified.
(6) disk operand
Specify the name of the disk area (volume group and partition) in which a HiRDB file system area was created.
(7) lan_updown operand
- When inheriting IP addresses:
- To turn the power to the network on or off, you can specify the IP address to be inherited in the .up file or the server identifier's .down file as the alias operand value. To do this, you must also specify use in the lan_updown operand.
- When not inheriting IP addresses:
- Before starting the running system and standby system HiRDB (or unit), you can activate the IP addresses specified in the -x and -c options of the pdunit operand. Do not specify an IP address specified in the -x or -c option of the pdunit operand in the alias operand value's .up or .down file for HA monitor. If IP addresses for client connection are to be inherited, specify these IP addresses. If there are no IP addresses to be inherited, such as IP addresses for client connection, specify nouse in the lan_updown operand of the server definition statement of HA monitor, or delete the alias operand value's .up and .down files.
- Standby-less system switchover facility
- For the standby-less system switchover (1:1) facility, activate the IP addresses specified in the -x and -c options of the pdunit operand before starting the normal BES unit and the alternate BES unit. For the standby-less system switchover (effects distributed) facility, activate the IP addresses specified in the -x and -c options of the pdunit operand before starting the unit with the HA group name.
- Do not specify an IP address specified in the -x or -c option of the pdunit operand in the alias operand value's .up or .down file for HA monitor. If IP addresses for client connection are to be inherited, specify these IP addresses. If there are no IP addresses to be inherited, such as IP addresses for client connection, specify nouse in the lan_updown operand of the server definition statement of HA monitor, or delete the alias operand value's .up and .down files.
(8) group operand
Specify this operand in order to perform grouped system switchover. Specifying this operand is not necessary if the only server to be switched is HiRDB. You specify a server group name in this operand. The examples below provide guidelines for specifying server group names:
- When performing OpenTP1 and grouped system switchover, specify the same value as the definition file that set up the environment for the specified server in Open TP1 of the same system.
- When using HiRDB Datareplicator and performing grouped system switchover, specify the same value as the definition file that set up the environment for the specified server in HiRDB Datareplicator.
(9) initial operand
When you use the standby system switchover facility, specify online for the primary system and standby for the secondary system.
When you use the standby-less system switchover (1:1) facility, specify online for the normal BES unit and standby for the alternate BES unit.
When you use the standby-less system switchover (effects distributed) facility, specify online for the host BES and standby for the guest BES.
(10) standbypri operand
Specification of this operand is applicable when the version of HA monitor is 01-08 or later.
You use this operand to specify priorities when you use the multi-standby function of HA monitor (use must be specified in the multistandby operand of the sysdef definition statement).
(11) Example of specifying the server definition statements
For this example, the standby-less system switchover (effects distributed) facility is applied to the following 3-unit configuration:
![[Figure]](figure/zu256301.gif)
Also, each of the following groups shares a global buffer:
- Group A: BES1A, BES2A, and BES3A
- Group B: BES1B, BES2B, and BES3B
The following table shows the priorities assigned to each unit:
Server | online | Highest priority | Second priority |
---|
BES1A | unt1 [1] [4] | unt2 [2] | unt3 [3] |
BES1B | unt3 [5] | unt2 [6] |
BES2A | unt2 [7] [10] | unt3 [8] | unt1 [9] |
BES2B | unt1 [11] | unt3 [12] |
BES3A | unt3 [13] [16] | unt2 [14] | unt1 [15] |
BES3B | unt1 [17] | unt2 [18] |
A specification example of the server definition statements follows:
Server definition statements for server machine 1
server name PDB1/bes1A,
alias bes1A,
patrol 10,
disk /dev/vg01,
initial online; ....[1]
server name PDB1/bes1B,
alias bes1B,
patrol 10,
disk /dev/vg02,
initial online; ....[4]
server name PDB1/bes2A,
alias bes2A,
patrol 10,
disk /dev/vg03,
initial standby,
standbypri 2; ...[9]
server name PDB1/bes2B,
alias bes2B,
patrol 10,
disk /dev/vg04,
initial standby,
standbypri 1; ...[11]
server name PDB1/bes3A,
alias bes3A,
patrol 10,
disk /dev/vg05,
initial standby,
standbypri 2; ...[15]
server name PDB1/bes3B,
alias bes3B,
patrol 10,
disk /dev/vg06,
initial standby,
standbypri 1; ...[17] |
Server definition statements for server machine 2
server name PDB1/bes1A,
alias bes1A,
patrol 10,
disk /dev/vg01,
initial standby,
standbypri 1; ....[2]
server name PDB1/bes1B,
alias bes1B,
patrol 10,
disk /dev/vg02,
initial standby,
standbypri 2; ...[6]
server name PDB1/bes2A,
alias bes2A,
patrol 10,
disk /dev/vg03,
initial online; ...[7]
server name PDB1/bes2B,
alias bes2B,
patrol 10,
disk /dev/vg04,
initial online; ...[10]
server name PDB1/bes3A,
alias bes3A,
patrol 10,
disk /dev/vg05,
initial standby,
standbypri 1; ...[14]
server name PDB1/bes3B,
alias bes3B,
patrol 10,
disk /dev/vg06,
initial standby,
standbypri 2; ...[18] |
Server definition statements for server machine 3
server name PDB1/bes1A,
alias bes1A,
patrol 10,
disk /dev/vg01,
initial standby,
standbypri 2; ...[3]
server name PDB1/bes1B,
alias bes1B,
patrol 10,
disk /dev/vg02,
initial standby,
standbypri 1; ...[5]
server name PDB1/bes2A,
alias bes2A,
patrol 10,
disk /dev/vg03,
initial standby,
standbypri 1; ...[8]
server name PDB1/bes2B,
alias bes2B,
patrol 10,
disk /dev/vg04,
initial standby,
standbypri 2; ...[12]
server name PDB1/bes3A,
alias bes3A,
patrol 10,
disk /dev/vg05,
initial online; ...[13]
server name PDB1/bes3B,
alias bes3B,
patrol 10,
disk /dev/vg06,
initial online; ...[16] |