How to reset NNMi database in Application Failover cluster.

  • KM03660565
  • 30-Jun-2020
  • 30-Apr-2021

Summary

Reinitializing procedure for NNMi database when in an AF cluster.

Question

If a database corruption occurs on the Primary node and you have a good DB backup (or not) here are the steps on how to re-initialize it.

Answer

1. Run:

Linux: /opt/OV/bin/nnmcluster -disable

Windows: %NNMInstallDir%\bin\nnmcluster -disable

2. Unconfigure the cluster by commenting below values in:

Linux: /opt/OV/shared/nnm/conf/props/nms-cluster.properties

Windows: %NNMDataDir%\shared\nnm\conf\props\nms-cluster.properties

#com.hp.ov.nms.cluster.name

#com.hp.ov.nms.cluster.member.hostnames

3. Stop all NNMi services:

Linux: /opt/OV/bin/ovstop -v

Windows: %NNMInstallDir%\bin\ovstop -v

Note: Verify that no cluster or NNMi services are running:

- Linux use ps -ef | grep nnm and ps -ef | grep nms. If any, use kill -9 to terminate them.

- For Windows check the Services menu or Task manager for the same.

4. Move or delete the current Postgres directory:


Linux: /var/opt/OV/shared/nnm/databases/Postgres/

Windows: %NNMDataDir%\shared\nnm\databases\Postgres\

5. Proceed with re-initializing the database:

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

Windows: %NNMInstallDir%\lbin\initnmsdb.ovpl -force

 

Optional 6: If you have a backup:

Linux: /opt/OV/bin/nnmrestoreembdb.ovpl -source <path to the DB backup file>

Windows: %NNMInstallDir%\bin\nnmrestoreembdb.ovpl -source <path to the DB backup file>