Reinitialize NNM database on the secondary Application Failover node

  • KM03787946
  • 26-Feb-2021
  • 07-May-2021

Summary

Use this procedure when the database on the secondary server is corrupted and cannot be fixed.

Question

This will not lead to any data loss because the database backup which is done by the cluster process in the primary will be syncronyzed to the secondary node:

Answer

1. Run: nnmcluster -disable on the primary
2. Make sure the cluster is unconfigured completely by commenting the values in the file on both nodes:

/var/opt/OV/conf/nnm/props/nms-cluster-local.properties

2. Stop all services on the secondary cluster

/opt/OV/bin/ovstop -c

Note: Check that no cluster or NNMi processes are running using ps -ef | grep nnm and ps -ef | grep nms. If any, use kill to stop those.

3. Proceed with removing the current PostgreS DB. You could also simply move the directory to another, location:

delete/move: /var/opt/OV/shared/nnm/databases/Postgres/

4. Then re-initialize the DB:

/opt/OV/lbin/initnmsdb.ovpl -force

It should start the recreation process
Recreating /var/opt/OV/shared/nnm/databases/Postgres/

Initializing database
Restore the good backup:
/opt/OV/bin/nnmrestoreembdb.ovpl -source <path to DB backup> -force

Starting nmsdbmgr process for embedded db restore...

Successfully started nmsdbmgr process for embedded db restore.

Restore and statistics analysis for database nnm completed successfully.

NNM embedded database successfully restored from <path to DB backup>

5. Uncomment the cluster values from /var/opt/OV/conf/nnm/props/nms-cluster-local.properties on the primay node:

6. Run nnmcluster -daemon on the primary and once the services have started and verified that nnmcluster -display points to the node as Current Active, go to the secondary and run the nnmcluster -daemon there as well.