Format
The syntax for calling the fencing command from the Mirroring Controller process or the Mirroring Controller arbitration process is described below.
fencingCmd executionMode mcDegradationOper cmdServerId targetServerId primarycenter
fencingCmd executionMode mcDegradationOper targetServerId
Input
monitor: Detect issues via automatic monitoring of the Mirroring Controller process
command: Mirroring Controller command execution (switch mode or detach mode of the mc_ctl command)
switch: Switch
detach: Disconnect
ID of the database server that called the command
ID of the database server to be fenced
Fixed value
monitor: Detect issues via automatic monitoring of the Mirroring Controller process
command: Mirroring Controller command execution (switch mode or detach mode of the mc_ctl command)
switch: Switch
detach: Disconnect
ID of the database server to be fenced
Output
0: Mirroring Controller will continue the degradation process.
Other than 0: Mirroring Controller will cancel the degradation process.
Description
Identifies the database server targeted for fencing based on the input server identifier, and implements the process that isolates it from the cluster system.
Notes
The command is executed by the operating system user who started Mirroring Controller or the Mirroring Controller arbitration process. Therefore, if the command is to be executed by a specific operating system user, change the executing user of the command accordingly.
The operating system user who started Mirroring Controller or the Mirroring Controller arbitration process must have execution privileges to the command. Otherwise, the degradation process will be canceled.
From a security point of view, set the access privileges as necessary so that the fencing command is not overwritten and unauthorized operations are not performed by unintended operating system users.
If the fencing command returns a value other than 0, Mirroring Controller will cancel the degradation process, so it is necessary for the user to check the status of the server, and switch or disconnect it manually.
Before executing the fencing command, check if the server is already fenced, to avoid the command terminating abnormally.
If the command times out, Mirroring Controller will stop the command, output an error message, and cancel the degradation process.
Information
The fencing command can be implemented by simply stopping the operating system or server. For example, if stopping the power for the database server, it is possible to use a utility to control the hardware control board in environments equipped with boards compatible with IPMI hardware standard.
Below is a sample script of a fencing command that powers off the database server using the IPMI tool.
Sample shell script
/installDir/share/mcarb_execute_fencing.sh.sample
Below is a sample script of a fencing command that powers off the database server using IPMIUTIL.
Sample shell script
installDir\share\mcarb_execute_fencing.bat.sample