Nonstop Database, HiRDB Version 9 System Operation Guide

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

26.4.3 HiRDB preparations

Executor: HiRDB administrator

This subsection explains how to prepare a system for HiRDB.

Organization of this subsection
(1) Conditions and notes
(2) Preparing a shared disk unit
(3) Creating HiRDB system definitions
(4) Creating RDAREAs
(5) Defining global buffers (standby-less system switchover (1:1) facility)
(6) Using audit trail files
(7) Notes on using the NetBackup linkage facility

(1) Conditions and notes

(2) Preparing a shared disk unit

There must be an external hard disk that can be shared between the primary system and the secondary system (or between the normal BES and the alternate BES). This hard disk is called a shared disk unit.

(a) Shared disk allocation

The following figure shows shared disk allocation.

Figure 26-72 Shared disk allocation

[Figure]

Explanation
A shared disk is allocated to each unit because system switchovers occur on a unit-by-unit basis.

Create the following HiRDB file system areas on the shared disk unit:

Notes
  • Set up these HiRDB file system areas so that the HiRDBs of both the primary system and the secondary system can reference the shared disk unit by using the same path name.
  • The shared disk on which HiRDB file system areas for shared RDAREAs are created must be activated in the write mode from all units. For this reason, the disk must not be deactivated or activated in conjunction with a system switchover.
  • On a shared disk, use character special files instead of regular files. If a system switchover occurs when regular files are in a status that does not apply to shared disks (for example, data remains in the operating system cache even though HiRDB finished writing it to the target files), any updates made to the files might be lost. Note that if the operating system can guarantee the integrity of the data in regular files (journal file systems) even if a system switchover occurs, the following files can be used on a shared disk:
    [Figure] Unload log files that are unloaded using the pdlogunld command or the automatic log unloading facility
    [Figure] Backup files that are acquired using the database copy utility (pdcopy)
    [Figure] Unload data files that are created using the database reorganization utility (pdrorg)
(b) Shared disk access control

If the system switchover source and target both attempt to access the shared disk at the same time while the system switchover facility is being used, the database might become corrupted. For this reason, accesses from the system to the shared disk must be controlled. This shared disk access control is performed by the cluster software or HiRDB.

Normally, the method described in Shared disk access control by the cluster software is used to perform access control on the shared disk. To use the method described in Shared disk access control by HiRDB, you must have HA Monitor 01-08 or later.

Shared disk access control by cluster software
The cluster software performs access control on the shared disk. It exercises control in such a manner that the running system is active and the standby and stopped systems are inactive, so that only the running system can access the shared disk. The following figure shows shared disk access control by the cluster software.

Figure 26-73 Shared disk access control by the cluster software

[Figure]
Explanation
An inactive system cannot access the shared disk. Only the running system can access the shared disk.
For details about the shared disk switching method (between active and inactive), see the cluster software documentation.
If you are using HA Monitor, you must specify the disk operand in the servers definition statement for HA Monitor.

Shared disk access control by HiRDB
To use HiRDB to perform access control on the shared disk, you must have HA Monitor 01-08 or later.
HiRDB can perform access control on the shared disk. In this case, shared disk switching (between active and inactive) is not performed. System switchovers take place in the following sequence:
  1. A failure that triggers a system switchover occurs.
  2. HiRDB confirms that all processes (HiRDB processes) have terminated in the source system.
  3. The system switchover takes place.
  4. The target system starts accessing the shared disk.
The following figure shows the shared disk access control that is provided by HiRDB.

Figure 26-74 Shared disk access control by HiRDB

[Figure]

(3) Creating HiRDB system definitions

(a) Configuring HiRDB system definition files

Copy the unit control information definition file and back-end server definition file of the normal BES unit to the alternate BES unit. Change the name of the unit control information definition file as follows:

pdutsys.unit-identifier-of-normal-BES-unit

Of the operands specified in this definition file, those whose settings become effective during alternation are listed below. For all other operands (other than those listed below), the values that are set in the unit control information definition file of the alternate BES unit are effective:

The following figure shows a configuration example of HiRDB system definition files when the standby-less system switchover facility (mutual alternating configuration) is used.

Figure 26-75 Configuration example of HiRDB system definition files when using the standby-less system switchover facility (mutual alternating configuration)

[Figure]

Explanation
  • Copy the unit control information definition file and back-end server definition file of the normal BES unit (BES1) to the alternate BES unit (BES2). Then change the name of the unit control information definition file to pdutsys.UNT1.
  • Copy the unit control information definition file and back-end server definition file of the normal BES unit (BES2) to the alternate BES unit (BES1). Then change the name of the unit control information definition file to pdutsys.UNT2.
(b) HiRDB system definition operands to be set up when the standby-less system switchover (1:1) facility is used

This subsection explains the HiRDB system definition operands that you need to set up when the standby-less system switchover (1:1) facility is used. The following table lists the related operands.

Table 26-19 HiRDB system definition operands to be set up when the standby-less system switchover (1:1) facility is used

Operand Description and notes
pd_ha Specifies to use the system switchover facility.
pd_ha_unit Do not specify this operand if a system switchover facility is used on the unit.
If the system includes a unit to which you do not want to apply the system switchover facility, or it includes a recovery-unnecessary front-end server unit, specify nouse for the pd_ha_unit operand of the unit control information definition of that unit.
pd_ha_acttype Specifies whether to use the system switchover facility in the monitor mode or the server mode.
monitor: Operate the system switchover facility in the monitor mode.
server: Operate the system switchover facility in the server mode.
When you use the server mode, specify server in this operand.
pd_ha_agent When you use the standby-less system switchover (1:1) facility, specify server in this operand.
pd_ha_transaction
pd_ha_trn_queuing_wait_time
pd_ha_trn_restart_retry_time

  • Specify these operands when you use the transaction queuing facility.
  • If you specify queuing in the pd_ha_transaction operand and the maximum number of concurrent connections (value of the pd_max_users operand) is exceeded, the HiRDB client will attempt to re-establish a connection to the HiRDB server for only the amount of time that is equal to pd_ha_trn_queuing_wait_time + pd_ha_trn_restart_retry_time.
pd_ha_switch_timeout This operand can be specified when the server mode is used. It is ignored in the monitor mode, even if it is specified.
This operand specifies whether to perform a system switchover without waiting for HiRDB termination processing when termination processing of HiRDB (or a unit for a HiRDB parallel server configuration) during the system switchover exceeds the server failure monitoring time. Server failure monitoring time refers to the time specified in the patrol operand of HA Monitor or Hitachi HA Toolkit Extension.
For details about the patrol operand of HA Monitor, see the manual High-Availability System Monitoring Facility. For details about the patrol operand of Hitachi HA Toolkit Extension, see the manual Hitachi HA Toolkit.
Y: Switch systems without waiting for HiRDB termination processing when HiRDB termination processing during a system switchover exceeds the server failure monitoring time.
N: Do not switch systems until all termination processing that occurs in HiRDB during a system switchover is finished.
pd_ha_prc_cleanup_check Specifies whether to place system switchover processing on hold until the server processes have terminated. For details, see 26.4.3(2)(b) Shared disk access control.
pd_mode_conf This operand is related to HiRDB (or unit) startup. Specify a value as explained below.
If you use the server mode, specify one of the following:
  • MANUAL2 if switch is specified in the switchtype operand of the servers definition of HA Monitor or Hitachi HA Toolkit Extension.
  • MANUAL1 if restart or manual is specified in the switchtype operand of the servers definition of HA Monitor or Hitachi HA Toolkit Extension.
pd_hostname Specifies the unit's standard host name. (This is the same as when the system switchover facility is not used.)
pdunit -x Specifies the unit's host name. (This is the same as when the system switchover facility is not used.)
-u Specifies the unit identifier.
-d Specifies the HiRDB directory name. Specify the same directory name for the normal BES unit and the alternate BES unit.
-p Specifies a HiRDB port number. Specify the same port number#1 for both the normal BES unit and the alternate BES unit.
-s Specifies a scheduler port number. Specify the same port number#2 for both the normal BES unit and the alternate BES unit.
-t Specifies a transaction server port number. Specify the same port number#3 for both the normal BES unit and the alternate BES unit.
pdstart -c Specifies the alternate BES name.
pdbuffer -c Specifies to allocate global buffers that the alternate portion uses when alternating units. For details, see 26.4.3(5) Defining global buffers (standby-less system switchover (1:1) facility)
pd_service_port Exercise care when specifying this operand in a server machine configuration that includes multiple units (including a mutual system switchover configuration). For such configurations (including a mutual system switchover configuration), use this operand to specify a separate port number for each unit in its unit control information definition.
If either of the following is specified, system switchovers to one of the units fail:
  • The pd_service_port operand of the system common definition is specified (when the pd_service_port operand of the unit control information definition is not specified).
  • A port number that is specified in the pd_service_port operand of another unit control information definition is specified in the pd_service_port operand of the unit control information definition.
pd_ha_mgr_rerun If notwait is specified for this operand, HiRDB does not wait for a startup processing completion notification from each unit when the system manager unit is switched (during startup processing at the switching-destination system). Therefore, the system manager unit can be switched even when there is a stopped unit.
For details about how to use this option, see 26.7.9 Notes on system switchovers for the system manager unit.

#1
Indicates the -p option of the pd_name_port and pdunit operands of the system definition.

#2
Indicates the -s option of the pd_scd_port and pdunit operands of the system definition.

#3
Indicates the -t option of the pd_trn_port and pdunit operands of the system definition.
(c) Server process allocation after a system switchover

After a 1-to-1 standby-less system switchover occurs, the alternate BES unit both executes its own processes and assumes the normal BES's processes. For this to occur, server processes are allocated to the alternate BES's original processes as well as to the normal BES's processes. The number of server processes executing the alternate BES's original processes fluctuates according to need, as does the number of server processes handling the normal BES's processes. However, the combined total cannot exceed the maximum number of active processes on the alternate BES (value of the pd_max_bes_process operand). This prevents an excessive increase in workload at the alternate BES after a system switchover. On the other hand, you need to be aware that the maximum number of service requests that can be processed concurrently after a system switchover is limited to one half of the original number. For this reason, when you set the pd_max_bes_process operand for the alternate BES, take into consideration both the increase in the unit's workload and the number of service requests that can be processed concurrently.

If the number of resident processes (value of the pd_process_count operand) has some margin before a system switchover and if server processes not currently processing service requests are resident, those server processes not currently processing service requests can be used to handle the normal BES's processes following a system switchover. As a result, processing performance after a system switchover improves.

The following figure shows the allocation of server processes following a 1-to-1 standby-less system switchover (1/2).

Figure 26-76 Allocation of server processes following a 1-to-1 standby-less system switchover (1/2)

[Figure]

Before a system switchover occurs, the maximum number of processes that can be processed concurrently equals the value of the pd_max_bes_process operand specified for the alternate BES (bes1). Additionally, as many server processes as the value of the pd_process_count operand for the alternate BES (bes1) can be kept resident.

When a system switchover occurs, processing for the normal BES (bes2) begins using available resident processes of the alternate BES (bes1). As a result, there is no need to start a server process for the normal BES (bes2), and processing by the normal BES (bes2) begins immediately following the switchover. Also, there is no need to keep a server process for the normal BES (bes2) on standby before a switchover.

If all resident processes are used up, additional server processes are started as needed, but the number of server processes is limited to the value of the pd_max_bes_process operand of the alternate BES (bes1).

The following figure shows the allocation of server processes following a 1-to-1 standby-less system switchover (2/2).

Figure 26-77 Allocation of server processes following a 1-to-1 standby-less system switchover (2/2)

[Figure]

Following a system switchover, while the alternate BES (bes1) is handling the normal BES's (bes2) processes, the server processes that were started as needed are allocated to the alternate BES (bes1) and the normal BES (bes2) within the range of the pd_max_bes_process operand of the alternate BES.

Where there are processing requests only for the alternate BES (bes1), the number of processes up to the value of the pd_max_bes_process operand for the alternate BES (bes1) can be executed concurrently for the alternate BES (bes1).

Where there are processing requests only for the normal BES (bes2), the number of processes up to the value of the pd_max_bes_process operand for the alternate BES (bes1) can be executed concurrently for the alternate BES (bes2).

(4) Creating RDAREAs

You define RDAREAs in HiRDB file system areas for RDAREAs on the shared disk. This subsection provides definition examples of creating user RDAREAs and system RDAREAs in HiRDB file system areas that are created on different shared disks. It also explains these concepts based on the system configuration examples shown in the following figures.

Figure 26-78 HiRDB single server configuration example

[Figure]

[Figure] Example create rdarea statement specification

 
create rdarea SMAST for masterdirectory                   1
  file name "/sds0111/srd01" initial 10 segments;
create rdarea SDIR for datadirectory                      2
  file name "/sds0112/srd02" initial 5 segments;
create rdarea SDIC for datadictionary                     3
  file name "/sds0113/srd03" initial 20 segments;
create rdarea SUSR01 for user used by PUBLIC              4
  file name "/sds0121/srd04" initial 500 segments;
create rdarea SUSR02 for user used by PUBLIC              5
  file name "/sds0131/srd05" initial 500 segments;
 

Explanation
  1. Creates the SMAST master directory RDAREA in the HiRDB file system area on shared disk A.
  2. Creates the SDIR data directory RDAREA in the HiRDB file system area on shared disk A.
  3. Creates the SDIC data dictionary RDAREA in the HiRDB file system area on shared disk A.
  4. Creates the SUSR01 user RDAREA in the HiRDB file system area on shared disk B.
  5. Creates the SUSR02 user RDAREA in the HiRDB file system area on shared disk C.

    Figure 26-79 HiRDB parallel server configuration example

    [Figure]

[Figure] Example create rdarea statement specification

 
create rdarea PMAST for masterdirectory                      1
    server name DIC file name "/dic0111/prd01"
    initial 10 segments;
create rdarea PDIR for datadirectory                         2
    server name DIC file name "/dic0112/prd02"
    initial 5 segments;
create rdarea PDIC for datadictionary                        3
    server name DIC file name "/dic0113/prd03"
    initial 20 segments;
create rdarea PUSR01 for user used by PUBLIC                 4
    server name BACK01 file name "/back0121/prd04"
    initial 500 segments;
create rdarea PUSR02 for user used by PUBLIC                 5
    server name BACK02 file name "/back0231/prd05"
    initial 500 segments;
 

Explanation
  1. Creates the PMAST master directory RDAREA in the HiRDB file system area on shared disk A.
  2. Creates the PDIR data directory RDAREA in the HiRDB file system area on shared disk A.
  3. Creates the PDIC data dictionary RDAREA in the HiRDB file system area on shared disk A.
  4. Creates the PUSR01 user RDAREA in the HiRDB file system area on shared disk B.
  5. Creates the PUSR02 user RDAREA in the HiRDB file system area on shared disk C.

(5) Defining global buffers (standby-less system switchover (1:1) facility)

When you define global buffers to be used by an RDAREA in the normal BES, specifying the -c option in the pdbuffer operand enables you to also allocate global buffers for use by the alternating portion when units are alternated.

If both the -c and -o options of the pdbuffer operand are omitted, the alternate BES unit cannot be started.

(a) Data global buffers (-r option global buffers)

This approach allocates global buffers for data when units are alternated. The following system configurations are examples of this approach.

[Figure] System configuration example 1

[Figure]

 
pdbuffer -a gbuf01 -r RDAREA01,RDAREA02 -n 1000 -c
pdbuffer -a gbuf02 -r RDAREA03,RDAREA04 -n 1000
 

Explanation
  • This configuration does not use global buffers with the same names in the normal BES and the alternate BES.
  • When the -c option is specified, gbuf01 is also allocated for the alternate BES. This global buffer is used when units are alternated. However, this global buffer is not used during normal operation.
  • When you are estimating the shared memory that the global buffers for the alternate BES unit will use, be sure to add enough memory for gbuf01.
  • The buffer hit rate will not decrease when units are alternated.

[Figure] System configuration example 2

[Figure]

 
pdbuffer -a gbuf01 -r RDAREA01,RDAREA02,RDAREA03,RDAREA04 -n 1000 -c
 

Explanation
  • This configuration uses global buffers with the same names in the normal BES and the alternate BES.
  • With the -c option specified, gbuf01 of the alternate BES will be used when units are alternated.
  • The buffer hit rate might decrease when units are alternated.
  • The buffer size of gbuf01 in the alternate BES will be the maximum page length of the RDAREAs in the normal BES and alternate BES.

When the -c option is omitted
When the -c option is omitted, global buffers specified by the -o option are used when units are alternated.
(b) Index global buffers (-i option global buffers)

The following system configuration examples are used to explain how to allocate global buffers for an index when units are alternated.

[Figure] System configuration example

[Figure]

 
pdbuffer -a gbuf01 -i USER01.INDX01 -n 1000 -c
 

Explanation
  • When the -c option is specified for a global buffer that uses non-row partitioned index INDX01, gbuf01 will also be allocated for the alternate BES. This global buffer is used when units are alternated. However, this global buffer is not used during normal operation.
  • When you are estimating the shared memory that the global buffers for the alternate BES unit will use, be sure to add enough memory for gbuf01.

[Figure] System configuration example

[Figure]

 
pdbuffer -a gbuf02 -i USER01.INDX02 -n 1000 -c
 

Explanation
  • When the -c option is specified for a global buffer that uses row partitioned index INDX02, gbuf02 will also be allocated for the alternate BES. This global buffer is used when units are alternated, so no access conflict with INDX02 occurs on BES2. However, this global buffer is not used during normal operation.
  • When you are estimating the shared memory that the global buffers for the alternate BES unit will use, be sure to have twice the size of gbuf02 available.

When the -c option is omitted
When the -c option is omitted, the global buffers are used when units are alternated according to the following priorities:
  1. If a global buffer is allocated to the index RDAREA and the -c option is specified for that global buffer, that global buffer is allocated using the approach explained in (a).
  2. The global buffer specified by the -o option is used.
(c) Global buffers for LOBs (-b option global buffers)

The approach for allocating global buffers for LOB when units are alternated is the same as the approach for allocating global buffers for data. However, when the -c option is omitted, data is written to or read from the RDAREA directly, without using a global buffer.

(d) -o option global buffers

An -o option global buffer in the alternate BES also uses the RDAREA in the normal BES when units are alternated. The buffer size of the global buffer is the maximum page length of the RDAREA in the normal BES and alternate BES.

(e) Design guidelines for global buffers

Basically, specify the -c option for global buffers used by RDAREAs, indexes, and LOB RDAREAs in normal BES units.

(6) Using audit trail files

Executor: HiRDB administrator or auditor

The HiRDB administrator creates audit trail files on a shared disk. The HiRDB administrator and the auditor can use the audit trail files on the shared disk.

(a) Creating audit trail files

The HiRDB administrator creates audit trail files on a shared disk.

(b) Using audit trail files

When a system switchover occurs, HiRDB records monitored events in an audit trail file on the shared disk. For details about operations involving audit trail files related to the recording of monitored events, see 24.6 Operation of audit trail files.

(c) Collecting audit trails

When a system switchover occurs, the way the audit trail collection status is inherited depends on whether the switched unit stops. If the system at the switching destination restarts, the status before the system switchover occurred is inherited. If the system at the switching destination starts normally, the specification in the pd_audit operand is used.

(d) Executing the pdload command

The HiRDB administrator executes the pdload command using the audit trail files as input information (certification is done by the auditor). However, if a factor such as an error caused a system switchover, HiRDB will not have correctly collected the audited events that occurred immediately before the system switchover. For this reason, even if the pdload command is executed, it might not be possible to collect the data that existed immediately before the system switchover.

(7) Notes on using the NetBackup linkage facility

When you use the NetBackup linkage facility in a system switchover configuration, the environment assignments and operations described below are necessary if the recovery is carried out on a NetBackup client different from the NetBackup client from which a backup was acquired. Apply these environment assignments and operations only when JP1/VERITAS NetBackup 5.0 or later is being used.