Reverting a master server of a Multi-Master cluster to a stand-alone server
Run the revertMasterToStandalone utility to revert a master server of a Multi-Master cluster, which is in inconsistent or unreachable state, to a stand-alone server. You must run this utility only for recovery scenarios and when the standard Multi-Master operations do not meet your requirement.
About this task
You must first try to remove the inconsistent master server from the cluster by using Removing a master server from Multi-Master cluster. If removing the master server fails, you can run this utility to clean up the Multi-Master configuration and revert the inconsistent or unreachable master server to a stand-alone server.
The revertMasterToStandalone utility is available in the agent folder under the SKLM_INSTALL_HOME directory.
- Windows
drive:\Program Files\IBM\GKLMV421\agent
- Linux and AIX
opt/IBM/GKLMV421/agent
- Windows: revertMasterToStandalone.bat
- Linux or AIX: revertMasterToStandalone.sh
The directory also contains the revertMasterToStandalone.properties file. This file is needed as an input to the utility. Specify the following properties in the file:
Property | Description |
---|---|
WAS_HOME | Default directory path:
|
JAVA_HOME | Optional. Default directory path:
|
DB_PASSWORD | Db2 administrator user password in plain
text. The utility does not validate the password before the run, and will fail in case it is incorrect. |
INITIAL_BACKUP_RESTORE_REQUIRED | Indicate the required state of the database after the revert operation. You can provide one
of the following values:
|
Procedure
Complete these steps on the master server that you want to revert to a stand-alone server:
Results
ERROR: Corrupt HADR state
- Resolution steps:
- Check whether the database is in the REMOTE_CATCH_PENDING state. To do so,
in the Db2 command window, run the
db2pd -db sklmdb41 -hadr command and check the HADR state.
In the REMOTE_CATCH_PENDING state, the Db2 log files are not synchronized between the primary and standby master server.
- Copy the log files from the primary master server to the standby master server being reverted.
To identify the log location, run the db2 get db cfg for SKLMDB41|grep LOGARCH command.
From the response, "First log archive method" gives the location of the log files on the disk. Manually copy the log files from this location on the primary master server to the standby master server.
- To synchronize the log files, on the Db2 command window, run the Roll Forward Pending command: db2 rollforward db sklmdb41 to end of logs and complete.
- Check whether the database is in the REMOTE_CATCH_PENDING state. To do so,
in the Db2 command window, run the
db2pd -db sklmdb41 -hadr command and check the HADR state.