clmgr: A Technical Reference
PowerHA SystemMirror 7.1 introduces a robust CLI utility
In its more than 20-year history, PowerHA SystemMirror (HACMP) has lacked a consistent, well-documented, thoroughly supported command-line interface (CLI). Configuration and control of PowerHA SystemMirror has been left to SMIT. Attempts were made at graphical utilities, which were mostly wrappers for the SMIT functions to perform the task at hand. For the command line-oriented administrator, looking to automate operations, including configuration tasks, the best that could be done was to find the command in SMIT and hope that all of the right environment variables were set.
In 2006, HACMP 5.4 introduced a utility called clvt that provided a glimmer of hope. Developed as a tool Smart Assists use to perform configuration tasks at the command level, its capabilities were limited to those the Smart Assists needed. In later releases, very little was done to update the clvt utility beyond that needed for the Smart Assists.
This lack of CLI changes with the PowerHA SystemMirror 7.1 plugin for IBM System Director. Now all of the PowerHA SystemMirror tasks need to be executable using a command-level utility. A substantial amount of development effort was expended to polish the interface and complete the capabilities. Although a huge improvement has been made in 7.1, be sure to check the man page for the task you wish to perform because not all tasks are there, yet. And of course, be sure to test thoroughly prior to final deployment.
The cluster used to develop this paper, which will be outlined later, is running on a pair of LPARs, one on each of two Power 570 systems. The storage and network are provided via virtual I/O (VIO), that is, the network traffic is bridged and the disks are virtual SCSI (vSCSI). One Ethernet adapter will be used for the cluster. The repository disk has been identified. See the Figures 1 and 2 for more details.
Figure 1. Cluster Infrastructure
Figure 2. Resource Group Configuration
There is online help. The man page for clmgr as of the writing of this paper is available using man clvt. If you know what you want to do, but you aren’t quite sure what options are available or their format, simply type as much of the command as you know, followed by a “-h.” This will produce only the help relevant to the typed command. For example, if you want to activate a node, you can type clmgr on node -h, which produces the following output:
# clmgr start node -h
# Available options for "clvt start node":
The output above provides all of the options for starting a node.
The format of the command is: clmgr <action> <class> [<name>] [<attributes>]. The action is what you want to do to the class (like node or resource group). The name parameter identifies the specific class object. The most common actions are:
add, query, delete
The most common classes are:
Specify the -a parameter when using the query action to filter out only the desired attribute. Specify the -v parameter when using the query action to produce verbose output. This will also produce verbose output for all of the objects in the specified class. Verbose output is the default when specifying a named object on the query; that is, no -v is necessary.
comments powered by