9.26 monswap (performs server hot-standby switchover)
Format
- Planned server hot-standby switchover
-
monswap {server-alias-name|-g group-name}
- Forced server hot-standby switchover
-
monswap -f {server-alias-name|-g group-name}
Users who can execute the command
Superuser
Description
This command performs planned or forced server hot-standby switchover.
- Planned server hot-standby switchover
-
The monswap -g command performs planned hot-standby switchover processing on the entire server group for grouped-system switchover. If the server group in the standby system contains a standby server that is in the grouped-system switchover wait state, you can start that standby server as the active server by executing the monswap -g command to perform hot standby processing on the entire server group.
When the multi-standby function is used, the monswap command performs planned hot standby processing on the standby server that has the highest priority. If a standby server is running in the primary system (the server for which online is specified in the initial operand in the server environment definition is running as a standby server), the command treats that standby server as having the highest priority.
Note that you can execute this command on a host on which an active server subject to planned hot standby is running.
- Forced server hot-standby switchover
-
The monswap -f command forcibly terminates the OS on which the active server is operating, and then performs hot-standby switchover.
If the multi-standby function is used, the monswap command performs forced hot-standby switchover to the standby server that has the highest priority. If a standby server is running in the primary system (the server for which online is specified in the initial operand in the server environment definition is running as a standby server), the command treats that standby server as having the highest priority.
Note that you can execute this command from any of the following components: the forced hot-standby switchover target server, the active system in which the forced hot-standby switchover target group exists, and the standby system in which the forced hot-standby switchover target group exists.
Options
-
server-alias-name
Specifies the alias name of the server on which planned hot standby processing is to be performed. Note that this option is applicable to a server that is not grouped.
-
-g group-name
Specifies the group name of a server group on which planned hot standby processing is to be performed.
You can use this option for a server group that is ready for grouped-system switchover.
You cannot use this option if only one server in the group is ready for hot-standby switchover. In this case, execute the monswap command with the server alias name specified.
-
-f server-alias-name
Specifies the alias name of the server on which forced hot-standby switchover is to be performed. You can use this option for a server that is paired with another server.
-
-f -g group-name
Specifies the group name of a server group on which forced hot-standby switchover is to be performed. You can use this option for the server group that is ready for grouped-system switchover and that contains servers paired with other servers.
You cannot use this option if only one server in the group is ready for hot-standby switchover. In this case, execute the monswap -f command with the server alias name specified.
Return codes
Value |
Meaning |
---|---|
0 |
Normal termination (the planned hot standby request has been accepted) |
Other than 0 |
Abnormal termination |
Examples
Performing forced server hot-standby switchover (monswap -f server-alias-name):
> monswap -f server1 To perform forced system switching of server:server1, a forced stop will be performed on host:host1. To continue this process, enter YES (in capital letters). If you enter anything other than YES, this command processing will stop. --->YES KAMN703-I Performing a forced stop on host:host1. KAMN459-I Command:monswap was terminated.
Legend: >: Indicates a user operation.
Performing forced server hot-standby switchover (monswap -f -g group-name):
> monswap -f -g groupA To perform forced system switching of group:groupA, a forced stop will be performed on host:host1. To continue this process, enter YES (in capital letters). If you enter anything other than YES, this command processing will stop. --->YES KAMN703-I Performing a forced stop on host:host1. KAMN459-I Command:monswap was terminated.
Legend: >: Indicates a user operation.
Notes
-
The return code is also set to 0 when any of the following messages is issued while type2 is specified in the exitcode operand in the HA Monitor environment settings:
KAMN212-E, KAMN215-E, KAMN216-E, KAMN322-E, KAMN323-E, KAMN328-E, KAMN330-E, KAMN426-E, and KAMN431-E
-
Planned or forced hot-standby switchover is performed asynchronously with the time when the monswap command returns a result.
-
If forced hot-standby switchover is performed, all servers that are operating on the same host terminate to forcibly terminate the OS of the host on which the target server or group is operating as the active server.
-
Note that only a server that is ready for hot-standby switchover (standby server on which the KAMN252-I message has been output) is subject to forced hot-standby switchover.