You are on page 1of 7

1.

0 Status and startup

1.1 Viewing cluster and package status:


# cmviewcl –v | more
This will describe the status of the cluster, nodes, packages and services.

1.2 Starting the cluster:


# cmruncl
This command will cause all configured nodes to form a cluster and start all enabled
packages.

1.3 Halting the cluster:


# cmhaltcl
This command will halt ServiceGuard operations on all nodes currently running in the
cluster. If any packages are running, the cluster will not be halted. Either use cmhaltpkg
first or use
# cmhaltcl –f
This will force the packages to halt before the cluster is halted.

1.4 Starting a node:


# cmrunnode <node_name>
This command will cause the specified node to join an already running cluster. Packages
that were enabled but previously unable to run may be started automatically by this
command.

1.5 Halting a node:


# cmhaltnode <node_name>
This command will halt ServiceGuard operations on the specified node. If any packages
are running on that node, the node will not be halted. Either use cmhaltpkg first or use
# cmhaltnode –f <node_name>
With this command, if a package is running on the specified node that can be switched to
an adoptive node, the switch takes place and the package starts on the adoptive node.

1.6 Running a package


# cmrunpkg [ -n <node_name> ] <package_name>
This will run the package on the current node or on the node specified, writing output in
the package control script log file, typically /etc/cmcluster/<SID>/<control_script>.log.

Note: Once a package has been halted it is also possible to run a package again by
modifying its package switching status to enabled, i.e.
# cmmodpkg –e <package_name>

1.7 Halting a package:


# cmhaltpkg <package_name>
This will halt the package, writing output in the package control script log file, typically
/etc/cmcluster/<package_name>/<control_script>.log.
1.8 Enabling a package for switching/failing over
After a package has been halted its global switching flag is disabled. This means the
package will not be moved to an adoptive node automatically if a failure occurs.
# cmmodpkg -e <package_name>
This will enable global switching.

1.9 Disabling a package from switching/failing over


# cmmodpkg -d <package_name>
This will disable global switching.

1.10Enabling a package to run on a particular node


After a package has failed on one node, that node is disabled. This means the package
will not be able to run on that node.
# cmmodpkg -e -n <node_name> <package_name>
This will enable the package to run on the specified node.

1.11Disabling a package from running on a particular node


# cmmodpkg -d -n <node_name> <package_name>
This will disable the package to run on the specified node.

2.0 Common MC/ServiceGuard Operations

The following operations are frequently performed in the operation of an


MC/ServiceGuard cluster. Additional information regarding the commands listed below
can be found in the “Managing MC/ServiceGuard” manual, or in the appropriate man()
pages.

2.1 Checking the status of the cluster


From any active node in the cluster:
• Logon as root
• cmviewcl -v
Expected output with the important items to note: (See the diagram in this document)
• Ensure all nodes are part of the cluster by checking the “Node Status” area.
• Ensure the AUTO_RUN is enabled for each package to allow it to switch to the
adoptive node in the cluster if the primary node fails.
• Ensure the “Node Switching Parameters” indicate that each package is running on
the appropriate node for your situation.
• Ensure that SWITCHING is enabled for all nodes.
2.2 Starting the cluster with all cluster nodes available
From any node which will be part of the cluster:
• Logon as root
• cmruncl -v
Note: If the nodes in the cluster are configured for automatic cluster startup, they will
try to join a cluster at boot time. If there isn’t an existing cluster to join, an
attempt to form a new cluster will be made. This will be successful only if all
defined nodes attempt to join the cluster within the time-out period of 10
minutes.
Expected output:
• Starting the cluster creates messages that are logged to the
“/var/adm/syslog/syslog.log” file. Use the “tail -f /var/adm/syslog/syslog.log”
command to view messages as the cluster is starting.
2.3 Starting the cluster with a limited number of cluster nodes available
From any available node which is normally part of the cluster:
• Logon as root
• cmruncl -v -n <node_name>
Expected output:
• A warning message will appear on the display when starting the cluster in this
manner. Ensure the cluster is not already running on another node prior to
selecting “y” to continue with cluster start-up.
• Starting the cluster creates messages that are logged to the
“/var/adm/syslog/syslog.log” file. Use the “tail -f /var/adm/syslog/syslog.log”
command to view messages as the cluster is starting.
2.4 Stopping the cluster
From any active node in the cluster:
• Logon as root
• cmhaltcl [-f] -v
Expected output:
• The “-f” option, if used, forces the halt of any running packages.
• Stopping the cluster creates messages that are logged to the
“/var/adm/syslog/syslog.log” file. Use the “tail -f /var/adm/syslog/syslog.log”
command to view messages as the cluster is stopping.

2.5 Joining an active cluster


From the node which will join the active cluster:
• Logon as root
• cmrunnode -v
Expected output:
• Joining the cluster creates messages that are logged to the
“/var/adm/syslog/syslog.log” file. Use the “tail -f /var/adm/syslog/syslog.log”
command to view messages as the node is joining the cluster.
2.6 Halting cluster activities on a node in an active cluster
From any active node in the cluster:
• Logon as root
• cmhaltnode [-f] -v node_name
Expected output:
• The “-f” option, if used, forces the halt of any packages running on this node.
• Halting a node in the cluster creates messages that are logged to the
“/var/adm/syslog/syslog.log” file. Use the “tail -f /var/adm/syslog/syslog.log”
command to view messages as the node halts cluster activities.

2.7 Running a package


From any active node in the cluster:
• Logon as root
• Check the status of the node as described above in Checking the Status of the
Cluster. Determine if the node is an active member of the cluster.
• If the node is not an active member of the cluster, start or join the cluster as
appropriate as described above.
• cmrunpkg -v -n <node_name> <package_name>
Note: If the package was previously shutdown using the “cmhaltpkg” command,
package switching will be disabled between nodes within the cluster. If desired,
enable package switching as described below. If the package is running with
switching disabled, the package will not failover in the event of a failure on the
current node.
Expected output:
• Running the package creates messages that are logged in the
“/etc/cmcluster/<package_name>/<control_script>.log” file. To view the file, use
the “tail -f /etc/cmcluster/<package_name>/<control_script>.log” command while
the package is starting.

2.8 Enabling package switching


From any active node in the cluster:
• Logon as root
• cmmodpkg -v -e <package_name>
Note: If the package is not currently running, the cmmodpkg command will enable
the package for switching and will start the package. If the package is currently
running, the cmmodpkg command will enable the package for switching. To
ensure package switching has been properly enabled, use the “cmviewcl -v”
command.
Expected output
• The cluster daemon will provide a response to the command through the standard
output.
2.9 Halting a package
From any active node in the cluster:
• Logon as root
• cmhaltpkg -v <package_name>
Expected output:
• Halting the package creates messages that are logged in the
“/etc/cmcluster/<package_name>/<control_script>.log” log file. Use “tail -f
/etc/cmcluster/<package_name>/<control_script>.log” command to view
messages while the package is halting.

2.10Moving a package from one node to another


From any active node in the cluster:
• Logon as root
• Check the status of the adoptive node as described above in Checking the Status
of the Cluster. Determine if the node is an active member of the cluster.
• If the node is not an active member of the cluster, start or join the cluster as
appropriate as described above.
• cmhaltpkg -v <package_name>
• cmrunpkg -v -n <node_name> <package_name>
• cmviewcl -v
Note: Since the package was shutdown using the “cmhaltpkg” command, package
switching will be disabled between nodes within the cluster. If desired, enable
package switching as described above. If the package is running with switching
disabled, the package will not failover in the event of a failure on the current
node.
Expected output:
• Halting or running the package creates messages that are logged in the
/etc/cmcluster/<package_name>/<control_script>.log” file. To view the file, use
the “tail -f /etc/cmcluster/<package_name>/<control_script>.log” command while
the package is stopping or starting.

2.11 Performing an HP-UX shutdown on an active cluster node


The necessary procedure is dependent upon the state of the cluster and the action you
wish to occur.
If the node is not an active member of the cluster:
• Follow standard shutdown procedures for the node (i.e. “/etc/shutdown”).
If no packages are currently running on the node:
• Follow standard shutdown procedures for the node (i.e. “/etc/shutdown”).
If any packages are running on the node, to shutdown this node and have the packages
run on an adoptive node:
• Move the packages from this node to another node as described above.
• Follow standard shutdown procedures for the node (i.e. “/etc/shutdown”).
If any packages are running on the node, to shutdown this node and not have the
packages run on an adoptive node:
• Halt the package as described above.
• Follow standard shutdown procedures for the node (i.e. “/etc/shutdown”).
4.0 Cmviewcl function diagram

cmviewcl -v results

Note: you must determine and fix the reason for a condition listed
below before initiating the corrective action indicated!

If this says “down”, you should start the cluster:


cmruncl

CLUSTER STATUS If this says “down”, you should tell the


myclust up node to join the cluster:
cmrunnode -n node1
NODE STATUS STATE
node1 up running

Network_Parameters:
INTERFACE STATUS PATH NAME
If this says “disabled”, you should
PRIMARY up 0/0/0/0 lan0 enable the package for switching:
PRIMARY up 0/5/0/0 lan2 cmmodpkg -e MYPKG
PACKAGE STATUS STATE PKG_SWITCH NODE
MYPKG up running enabled node1

Policy_Parameters:
If this says “down”, you should
POLICY_NAME CONFIGURED_VALUE
Failover configured_node run the package:
Failback manual cmrunpkg -n node1 MYPKG
Script_Parameters:
ITEM STATUS MAX_RESTARTS RESTARTS NAME
Service up 3 0 MYPKG
Subnet up 1.1.1.0

Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled node1 (current)
Alternate up enabled node2

NODE STATUS STATE If either of these says “disabled”,


node2 up running
you should enable the package to
Network_Parameters: run on that particular node:
INTERFACE STATUS PATH NAME cmmodpkg -e -n node1 MYPKG
PRIMARY up 0/0/0/0 lan0 or
PRIMARY up 0/5/0/0 lan2
cmmodpkg -e -n node2 MYPKG

If this says “down”, you should tell the


node to join the cluster:
cmrunnode -n node2

You might also like