Hitachi

Hitachi Advanced Database Setup and Operation Guide


16.4.2 Terminating HADB servers in the multi-node configuration

Organization of this subsection

(1) Termination procedures for HADB servers in a multi-node configuration

(a) Normally terminating HADB servers in the multi-node configuration

The following shows the procedure for normally terminating the HADB servers in the multi-node configuration.

Procedure:

  1. Execute the adbstop command on the master node.

    When the adbstop command is executed on the master node, the HADB servers on all nodes terminate normally.

  2. Execute HA Monitor's monend command on the master node.

    After confirming that the HADB servers on all nodes have terminated normally, execute HA Monitor's monend command on the master node.

(b) Forcibly terminating HADB servers in the multi-node configuration

The following shows the procedure for forcibly terminating the HADB servers in a multi-node configuration.

Procedure:

  1. Execute the adbstop --force command on each slave node.

    Execute the adbstop --force command on all slave nodes.

    In addition, confirm that the adbstop --force command terminated on all slave nodes.

  2. Execute the adbstop --force command on the master node.

    Confirm that the adbstop --force command terminated.

  3. Execute HA Monitor's monend command on the master node.

(2) Terminating an HADB server on a specific node

(a) Normally terminating the HADB server on the master node only

The procedure for normally terminating the HADB server only on the master node differs depending on whether you are using host reset or SCSI reservation for shared disk.

  • When using host reset

    If you execute the HA Monitor monswap command on the master node, only the HADB server on the master node ends normally. At this time, a master node switchover occurs, and the slave node with the highest priority becomes the master node.

    Furthermore, if you execute the monswap command, all running transactions on the master node are canceled, and all the connections running those transactions are terminated. All connections that have not yet run any transactions are also terminated. After the connection termination processing is complete, the master node's HADB server begins its termination processing.

    Important

    If you accidentally terminate the master node's HADB server by using the adbstop --node command, execute the monswap command on that node.

  • When using SCSI reservation for shared disk

    Procedure:

    1. Execute the adbstop --cancel --node command on the master node.

    2. Execute the HA Monitor command monswap on the master node.

    This procedure normally terminates the HADB server only on the master node. At this time, a master node switchover occurs, and the slave node with the highest priority becomes the master node.

(b) Forcibly terminating the HADB server on the master node only

If you execute the adbstop --force command on the master node, only the master node's HADB server is forcibly terminated. At this time, a master node switchover occurs, and the slave node with the highest priority becomes the master node.

Note

Recovery processing (rollback) performed on update processing that had been running on the master node you forcibly terminated, is executed on the slave node that becomes the new master node.

(c) Normally terminating the HADB server on a slave node only

Execute the adbstop --node command on a slave node to normally terminate the HADB server of the slave node on which the command is executed.

(d) Forcibly terminating the HADB server on a slave node only

Execute the adbstop --force command on a slave node to forcibly terminate the HADB server of the slave node on which the command is executed.

(3) Termination modes for HADB servers in a multi-node configuration

The following shows the termination modes for the HADB servers in a multi-node configuration.

Table 16‒6: Termination modes for HADB servers in a multi-node configuration

No.

Termination mode

Command to be executed

Explanation

1

Normal termination of HADB servers in a multi-node configuration

adbstop

Last termination mode Executing the adbstop command on the master node terminates normally the HADB servers in the multi-node configuration.

There are four types of normal termination, and the termination process differs depending on the option specified. For details, see (2) Option specification and normal termination types in 10.2.2 Terminating the HADB server.

2

Normal termination of the HADB server of a specific node

  • In the case of a master node: monswap#

  • In the case of a slave node: adbstop --node

Only the HADB server of the slave node on which the command was executed is terminated normally.

If the master node is terminated normally, one of the slave node switches over to become the master node.

3

Forced termination of the HADB server of a specific node

adbstop --force

In this case, the HADB server of the node on which you executed the adbstop command is immediately terminated without waiting for the completion of ongoing transactions.

If the master node is terminated forcibly, one of the slave node switches over to become the master node. At this time, recovery processing (rollback) performed on update processing that had been running on the master node, is executed on the slave node that becomes the new master node.

When only the master node remains, and the master node's HADB server is terminated forcibly, recovery processing (rollback) is performed on update processing when the HADB servers are restarted in the multi-node configuration.

4

Abnormal termination of the HADB server of a specific node

--

  • When the master node HADB server is terminated abnormally

    If the master node terminates abnormally, it is separated from the multi-node configuration, and one of the slave node switches over to become the master node. At this time, recovery processing (rollback) performed on update processing that had been running on the master node, is executed on the slave node that becomes the new master node.

    When only the master node remains, and the master node's HADB server terminates abnormally, recovery processing (rollback) is performed on update processing when the HADB servers are restarted in the multi-node configuration.

  • When a slave node's HADB server terminates abnormally

    The slave node that terminated abnormally is separated from the multi-node configuration. At this time, transactions are rolled back on the master node.

Legend:

--: Not applicable.

#

Execute this command when using host reset.

When using SCSI reservation for shared disk, execute the adbstop --cancel --node command before executing the monswap command.