nnmcluster — start NNMi cluster services
nnmcluster
[-disable|-enable] [-display] [-interfaces] [-startnnm|-stopnnm]
[-acquire|-relinquish] [-shutdown [-force]] [-dbsync] [-halt] [-node nodename
] [ [-daemon]]
nnmcluster
starts the NNMi cluster process.
The NNMi cluster command permits an administrator to set up two systems for ensuring the availability of NNMi services if one system fails.
After you run the nnmcluster
command on each node, each one will detect the other and form a cluster.
The first node to join the cluster comes up in the active
state, and starts
the NNMi services (using the ovstart
command). The second node detects that there is already an
active node, and assumes the standby
state. If the standby node loses connectivity with the active node,
(due to system shutdown or failure), then the standby node assumes the active
state and starts
the NNMi services.
If the nnmcluster
is called with no command-line parameters, it starts the cluster in interactive mode.
The interactive mode permits the system administrator to view and modify cluster settings in an interactive session. These settings
include the ability to enable or disable automatic failover, shutdown a node in the cluster, transfer NNMi services from active to
standby, and other settings.
If nnmcluster
is called with the -daemon
parameter, the NNMi cluster
starts up as a background daemon process or Windows service.
If the nnmcluster
command is called with other command-line parameters, it will initiate the
actions specified on the command-line. These actions typically affect the NNMi cluster daemon process on the local node. However, if
the -node
option is used, it affects the NNMi cluster daemon
process on the specified nodename
node
.
Most of the options available from the command-line are also available in interactive mode. For example, using the
-shutdown
option from the command line is the same as using the
shutdown
command in interactive mode. The interactive mode has some additional commands, such as
help
, to display a list of available commands, and quit
, to exit the
interactive mode. The -node
command is also available interactively.
nodename
Note that only NNMi cluster daemon processes are capable of starting NNMi services. The interactive mode and specifying actions on the
command-line are methods for affecting the behavior of a daemon process on one of the nodes in the cluster. For example, using the
-acquire
option causes the daemon process on the local node (or the specified node if used with
the -node
option), to acquire the active
state and start NNMi services.
After an NNMi cluster daemon process is started, the only way of interacting with that daemon process is by using the command line or
interactive mode settings. For example, if you want to terminate that daemon process, use the
nnmcluster -shutdown
command.
When NNMi is using the embedded database, the NNMi cluster application synchronizes the database between the active and standby nodes.
This is achieved by sending a complete database backup to the standby, followed by periodic incremental database transaction logs.
The time intervals for the frequency of full backups and transaction logs, along with other cluster parameters, are defined in the
nms-cluster.properties
file.
For the embedded database scenario, the NNMi cluster application has a startup period that must occur before permitting the active node
to send the database to the standby node. During this startup period, command options that would transfer the
active
state to the standby node are disabled. These options include
shutdown
, acquire
, relinquish
, and other
available options, as they can leave the standby node in a state where it only has a portions of the database and is unable to run NNMi.
However, after the standby node has received the entire database, there should be no critical times from that point forward,
assuming both systems stay running (a restart causes the standby node to verify that it is still in-sync with the active node).
If NNMi is using the Oracle database, then no database replication is performed, as the Oracle database instance is on a third machine
outside of NNMi control. In this scenario, the NNMi nnmcluster
command still monitors the active NNMi management server
and starts NNMi on the standby server if the active fails.
The nnmcluster
command recognizes the following options. Any unrecognized options are reported by a
usage message. Options are always processed in the specified order. For example, using -display -disable
is
different from using -disable -display
. All of the parameters refer to the NNMi cluster daemon process on the
local node, unless the -node
option is used.
nodename
-disable
Disables the automatic failover capability (automatic failover is enabled by default). The system administrator might
choose to shutdown the active node briefly to perform some administrative tasks. The -disable
parameter permits the active node to be shut down without the standby node becoming active and starting the NNMi services.
You can restart the same node in the active
state by using the
-acquire
option followed by the -enable
option.
-enable
Re-enable automatic failover capability after being disabled as described above.
-interfaces
List the network interfaces (NICs) on the system, displaying the system nomenclature and the Java nomenclature. On Unix platforms, these are the same value, e.g. "eth0", "lan1", "bge3", etc. On Windows, the names are different, e.g. "Network Interface 1" might map to "eth3". The purpose of this parameter is to control the NIC used for NNMi cluster communications; e.g. to choose a management NIC instead of the data NIC. The NNMi cluster needs to know the Java name, e.g. "eth3" in the Windows case listed above.
-display
Connect to the cluster, query the current cluster state, then display that state to the administrator.
-startnnm
The active node may not be running NNMi services. For example, suppose you stopped the NNMi services earlier using
the -stopnnm
option. You can start up the NNMi services on the active node by using the
-startnnm
option.
-stopnnm
Shut down the NNMi services on the active node, but do not release the active
state.
If you use this option, NNMi does not generate a failover event. For example, the standby node does not assume the
active
state.
-acquire
The system administrator might want to transfer NNMi services from a node which is currently in the
active
state to another node which is currently in the
standby
state. Without using the -node
option, the local system
becomes the new active node. If the administrator uses the -node
option, the specified node becomes the new active node.
nodename
-relinquish
Permits the system administrator to give up the active
state on the local (currently
active) node and causes the NNMi services to transfer control to the current standby node. The node being relinquished stops
NNMi services and assumes the standby
state.
-dbsync
Permits the system administrator to trigger an immediate database synchronization on active node. This option is only applicable when NNMi is using the embedded database (not using an Oracle database).
-shutdown [-force]
Shuts down the NNMi cluster daemon process on the local node. If the -node
option is
provided, then shut down the NNMi cluster daemon process on the specified node. The NNMi cluster program tries to prevent
you from shutting down the cluster during times when doing so might compromise the data integrity on the standby server.
For example, if the standby server is receiving a full database backup from the active server, it would be bad to have a
failover event during that time. If you try to shut down the NNMi daemon process, you might get a message stating that the
cluster is in a transition state, as in the standby node is receiving important data, so you need to permit it to complete
before attempting ot shut down the cluster daemon process.
If you want to force a shutdown anyway, use the "-force
" option. This disables failover
to the standby (since it is in an incomplete state), then shuts down the local (or specified) node.
-halt
Shuts down the NNMi cluster daemon process on all nodes in the cluster. This disables failover, shuts down all standby nodes, then shuts down the active node.
-node nodename
Causes one or more actions specified on the command line to affect the NNMi cluster daemon process on the specified
nodename
. Without specifying this option, the actions specified on the command line
to apply to the local NNMi cluster daemon.
-daemon
Starts the NNMi cluster as a daemon. The command is immediately launched in the background. No other command line parameters can be specified in daemon mode.
If running the nnmcluster
command with command line options results in success, the command exits with
the 0
(zero) status (there are no errors). However, if running the
nnmcluster
command with command line options results in failure, the command exits with
the 1
status (there are errors).
In interactive mode, the exit status is always 0.
In daemon mode the nnmcluster
command launches as a background process and the shell prompt is
immediately returned. After you start a daemon process, you can monitor cluster status by using the
nnmcluster -display
or ovstatus
commands: the NNMi cluster determines
if or when to start NNMi services, depending on the active
or standby
status of the node in relation to other nodes in the cluster; ovstatus
displays a
not running
status on the standby node, but running the nnmcluster -display
command tells you that the node is in the standby
state.
nnmcluster
logs output to the NNMi log directory (/var/opt/OV/log/nnm
on Unix, and %NnmDataDir%\log\nnm
on Windows). Each actively-running instance of the
nnmcluster
process, such as a daemon running in parallel with either or both the interactive or
command-line mode, has a separate log file. The most-recent running threads will always be nnmcluster.0.*.log
.
The NNMi cluster internally uses an open-source technology called JGroups.
The log files for JGroups are in the same directory shown above, and are named jgroups.log
.
nnmcluster -daemon
nnmcluster -display
The first command starts the NNMi cluster as a daemon process, and immediately returns a shell prompt, leaving a background daemon process.
You can query, shut down, or apply other actions to this daemon process using interactive or command-line modes.
You can repeatedly use the second command to monitor the status of the cluster, specifically the local daemon process,
to determine if it comes up in the active
or standby
state.
nnmcluster -shutdown -node xyz.mycompany.com
Causes the NNMi cluster daemon process on the specified node to shut down. If that node is the current active node, and if automatic failover is enabled, then the NNMi services will transfer to the standby node.
nnmcluster
Enter the interactive mode of the NNMi cluster command to view or modify cluster parameters. To exit this program, use
the exit
or quit
commands.
nnmcluster -acquire
Cause the daemon-mode NNMi cluster process on the local system to become the active node. The current active is set to standby mode then NNMi services start on the local node.
The following is a common system administration sequence to permit the administrator to temporarily shut down the NNMi cluster on the active node, then bring it back up later as active, without causing a failover event to the standby node.
Step 1: Run the nnmcluster -disable -shutdown command.
Step 2: Perform some system administration tasks.
Step 3: Run the nnmcluster -daemon command.
Step 4: Run the nnmcluster -display command. Use this command to determine when the daemon is up.
Step 5: Run the nnmcluster -enable command.
The command shown in step 1 disables failover first, then shuts down the local daemon process. In step 2, the system administrator performs some administration tasks without the risk of triggering a failover. The command shown in step 3 restarts the daemon NNMi cluster process. You can repeatedly use the command shown in step 4, to determine when the local daemon process is up and NNMi is running. The command shown in step 5 re-enables automatic failover after NNMi is running on the active node.
Windows: $%NNM_PROPS%\nms-cluster.properties
UNIX: $NNM_PROPS/nms-cluster.properties
This file defines the cluster parameters; specifically, you must uniquely name the cluster to differentiate it from other NNMi clusters that might be on the same network. You can optionally set other parameters such as timeouts.