Академический Документы
Профессиональный Документы
Культура Документы
Version 7.2.2
IBM
IBM PowerHA SystemMirror for Linux
Version 7.2.2
IBM
Note
Before using this information and the product it supports, read the information in “Notices” on page 21.
This edition applies to IBM PowerHA SystemMirror 7.2.2 for Linux and to all subsequent releases and modifications
until otherwise indicated in new editions.
© Copyright IBM Corporation 2017.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this document . . . . . . . . . v installpha command . . . . . . . . . . . 18
Highlighting . . . . . . . . . . . . . . v uninstallpha command . . . . . . . . . . 18
Case-sensitivity in Linux . . . . . . . . . . v
ISO 9000. . . . . . . . . . . . . . . . v Notices . . . . . . . . . . . . . . 21
Privacy policy considerations . . . . . . . . 23
PowerHA SystemMirror for Linux Trademarks . . . . . . . . . . . . . . 23
commands . . . . . . . . . . . . . 1
clmgr command . . . . . . . . . . . . . 1 Index . . . . . . . . . . . . . . . 25
clRGinfo command . . . . . . . . . . . . 16
Highlighting
The following highlighting conventions are used in this document:
Bold Identifies commands, subroutines, keywords, files, structures, directories, and other items whose names are
predefined by the system. Bold highlighting also identifies graphical objects, such as buttons, labels, and
icons that the you select.
Italics Identifies parameters for actual names or values that you supply.
Monospace Identifies examples of specific data values, examples of text similar to what you might see displayed,
examples of portions of program code similar to what you might write as a programmer, messages from
the system, or text that you must type.
Case-sensitivity in Linux
Everything in the Linux operating system is case-sensitive, which means that it distinguishes between
uppercase and lowercase letters. For example, you can use the ls command to list files. If you type LS, the
system responds that the command is not found. Likewise, FILEA, FiLea, and filea are three distinct file
names, even if they reside in the same directory. To avoid causing undesirable actions to be performed,
always ensure that you use the correct case.
ISO 9000
ISO 9000 registered quality systems were used in the development and manufacturing of this product.
To view the man page for a specific command, run the man command-name, where command-name is the
name of the command. For example, to view the man page for the clmgr command, you would enter
man clmgr from the command line interface.
clmgr command
Purpose
The clmgr command provides a consistent, reliable interface for performing PowerHA SystemMirror
cluster operations by using a terminal or script.
Syntax
You can use the built-in help option for the clmgr command from the command line interface. For
example, when you run the clmgr command without specifying any flags or parameters, a list of the
available ACTIONS flags are displayed. If you enter the clmgr ACTION command without specifying the
CLASS object, a list of all the available CLASS objects for the specified ACTION flag is displayed. If you
enter the clmgr ACTION CLASS command without specifying any NAME or ATTRIBUTES options, different
output is displayed because few ACTION+CLASS combinations do not require any additional
parameters. To display help information in this scenario, you must explicitly append the -h flag to the
clmgr ACTION CLASS command. You cannot display help information from the command line for
individual attributes of the clmgr commands.
Description
The clmgr command provides consistent syntax for easy use. In addition, the clmgr command provides
consistent return codes for easier scripting. Several output formats are also provided for data queries to
collect cluster information.
All clmgr command operations are logged in the clutils.log file, including the name of the command
that was run, the commands start time and stop time, and the user name that initiated the command.
Note: The ACTION flag is not case-sensitive. All ACTION flags provide a shorter alias. For example,
rm is an alias for delete action. Aliases are provided for convenience from the command line and
must not be used in scripts.
The following four ACTION flags are available on almost all the supported CLASS objects:
v add (Alias: a, cr*, make, mk, bu*, bld)
v query (Alias: q*, ls, get, l, sh*)
v modify (Alias: mod, ch, set)
v delete (Alias: de*, rem*, rm , er*)
The following ACTION flags are typically supported only on a subset of the supported CLASS
objects:
v Cluster, node, resource group:
– start (Alias: online, on*)
– stop (Alias: offline, of*, dea*)
v Resource group:
– move (Alias: mov*, mv)
v Log:
– manage (Alias: ma, mg)
v Cluster:
– verify (Alias: ve)
v Log:
– view (Alias: vi)
v Smart_Assist:
– setup
– update
v Snapshot:
– manage (Alias: ma, mg)
v Application, service_ip:
– reset
CLASS
The type of object upon which the value that you specified for the ACTION flag is performed.
Note: The CLASS flag is not case-sensitive. All CLASS objects provide a shorter alias. For example,
cl is an alias for Cluster. Aliases are provided for convenience from the command line and must not
be used in scripts.
The complete list of supported CLASS objects follows:
v cluster (Alias: cl*)
v node (Alias: no*, nd)
v interface (Alias: int*)
v network (Alias: ne*, nw)
v resource_group (resource_g*, rg)
v service_ip (se*, si)
Note: An ATTR attribute does not need to be fully typed. Only the number of leading characters that
are required to uniquely identify the attribute from the set of available attributes for the specified
operation must be specified.
-a Displays only the specified attributes, and is valid only with the query, add, and modify ACTION
flags. Attribute names are not case-sensitive, and can be used with the standard UNIX wildcard
characters such as an asterik (*) and question mark (?).
-c Displays all data in colon-delimited format, and is valid only with the query, add, and modify
ACTION flags.
-d Valid only with the query, add, and modify ACTION flags, requests all data to be displayed in
delimited format, by using the specified delimiter.
-f Overrides any interactive prompts, forcing the current operation to be attempted (if forcing the
operation is a possibility).
-h Displays help information.
-l Activates the following trace log values for serviceability:
Error Updates the log file only if an error is detected.
Standard
Logs basic information for every clmgr operation.
Low Performs basic entry and exit tracing for every function.
Med Performs med tracing, adding function entry parameters, and function return values.
High Performs high tracing, adding tracing to every line of execution, omitting routine, and utility
functions.
Max Performs maximum tracing, adding the routine function and utility function. Adds a time and
date stamp to the function entry message and exit message.
Commands 3
Note: All trace data is written into the clutils.log file. This flag is used for troubleshooting
problems.
-S Displays data without column headers, and is valid only with the query ACTION flag and the -c
flag.
-T A transaction ID is applied to all logged output to help group one or more activities into a single
section of output that can be extracted from the log file for analysis. This flag is used for
troubleshooting problems.
-v Displays maximum verbosity in the output.
Note: Displays all instances of the specified class, when this flag is used with the query ACTION
flag and no specific object name. For example, if you run the clmgr -v query node command, all
nodes and their attributes are displayed. This flag displays resulting attributes after the operation is
complete (only if the operation was successful), when this flag is used with the add or modify
ACTION f.
-x Displays all data in a simple XML format, and is valid only with the query, add, and modify
ACTION flags.
The following sections show the example syntax for all the clmgr command operations:
v Application
v Cluster
v Dependency
v File collection
v Group
v Interface
v Log
v Network
v Node
v Persistent IP/Label
v Resource group
v Service IP/Label
v Snapshot
v User
v NFS_client
v Equivalency
v Smart_Assist
Cluster
clmgr add cluster \
[ <cluster_label> ] \
[ NODES=<host>[,<host#2>,...] ] \
add => create, make, mk
cluster => cl
Network
clmgr add network <network> \
[TYPE={ether|disk}] \
[PVID={#PVID}] \
[NODES=<node_P1>[,<node_P2>,...]
Commands 5
clmgr delete <network>[,<network#2>,<network#n>,...]
STARTUP:
OFAN ---- Online on First Available Node
OAAN ---- Online on All Available Nodes (concurrent)
FALLOVER:
FNPN ---- Fallover to Next Priority Node (default value)
BO ------ Bring Offline (On Error Node Only)
FALLBACK:
NFB ----- Never Fallback
FBHN --- Fallback to Home Node (default value)
clmgr modify resource_group <resource_group> \
[ NAME=<new_resource_group_label>] \
[ NODES=nodeA1[,nodeA2,...]] \
[ STARTUP={OFAN|OAAN}] \
[ FALLOVER={FNPN|BO}] \
[ FALLBACK={NFB|FBHN}] \
[ SERVICE_LABEL=service_ip#1[,service_ip#2,...]] \
[ APPLICATIONS=app#1[,app#2,...]] \
[ PRIORITY= <0-200>]
[ NAME ]
[ CURRENT_NODE ]
[ NODES ]
[ STATE ]
[ TYPE ]
[ PRIORITY ]
[ STARTUP ]
[ FALLOVER ]
[ FALLBACK ]
[ APPLICATIONS ]
[ SERVICE_LABEL ]
[ NESTED_RGS ]
Note: The ALL attribute attempts to bring all resource groups online or offline.
Commands 7
clmgr -v query persistent_ip
service_ip => si
Application
clmgr add application <application> \
TYPE=Process \
STARTSCRIPT="/path/to/start/script" \
STOPSCRIPT="/path/to/stop/script" \
PROCESS="/process/to/monitor" \
[OWNER="<owner_name>"] \
[RESOURCETYPE=“1,2” ] \
[STARTCOMMANDTIMEOUT=""] \
[STOPCOMMANDTIMEOUT=""] \
[CLEANUPMETHOD="</script/to/cleanup>" ] \
[PROTECTIONMODE="0,1" ]
Note: The app value is an abbreviation for application. Aliases for application are ac and app.
Dependency
clmgr add dependency <dependency_name> \
TYPE={[<DEPENDSON|DEPENDSONANY|STARTAFTER|STOPAFTER|
COLLOCATED|ANTICOLL OCATED|FORCEDDOWNBY|ISSTARTABLE]} \
SOURCE="<rg#1>" \
TARGET="<rg#2>[,<rg#3>,...,<rg#n>]"
Commands 9
[NAME="<new_label>" ] \
[TYPE={[<DEPENDSON|DEPENDSONANY|STARTAFTER|STOPAFTER|
COLLOCATED|ANTICOLLOCATED|FORCEDDOWNBY|ISSTARTABLE]} ] \
[TARGET="<rg#1>[,<rg#2>,...,<rg#n>]" ]
manage => mg
snapshot => sn, ss
manage => mg
User
clmgr add user <user_name> \
[ ID=<###|upto 4294967294> ] \
[ ADMINISTRATIVE={false|true} ] \
[ CHANGE_ON_NEXT_LOGIN={true|false} ] \
[ PRIMARY=<group> ] \
[ GROUPS=<group#1>[,<group#2>,...] ] \
[ ROLES=<role> ] \
[ HOME=<full_directory_path> ] \
[ SHELL=<defined_in_/etc/shells> ] \
[ EXPIRATION=<days from epoch | YYYY-MM-DD> ] \
[ LOCKED={false|true} ] \
[ DAYS_TO_WARN={#|0} ] \
[ LOCKOUT_DELAY=<days_btwn_expiration_and_lockout> ] \
[ MAX_PASSWORD_AGE={in days} ] \
[ MIN_PASSWORD_AGE={in days} ]
Commands 11
[ LOCKED={false|true} ] \
[ DAYS_TO_WARN={#|0} ] \
[ LOCKOUT_DELAY=<days_btwn_expiration_and_lockout> ] \
[ MAX_PASSWORD_AGE={in days} ] \
[ MIN_PASSWORD_AGE={in days} ] \
Details
The class attribute for the clmgr command is not case-sensitive. For example, in the following command,
the NODES attribute can be NODES, nodes, or Nodes. This cluster is a cluster with two nodes. The cluster
name is cluster1 and the nodes are named nodeA and nodeB.
Example
clmgr create cluster clMain NODES=nodeA,nodeB
Commands 13
Example: Creating a cluster
Details
This cluster is a cluster with two nodes. The cluster name is cluster1 and the nodes are named node1
and node2.
Example
clmgr create cluster cluster1 NODES=node1, node2
Details
This resource group is a non-concurrent resource group created by using default policy and is named RG1.
The resource group contains a service IP address that is named access1, and an application named app1.
Examples
clmgr add resource_group RG1 SERVICE_IP=access1 \
APPLICATIONS=app1
To know the state of a specified object, so that appropriate actions can be taken, use the following clmgr
commands.
Examples
v clmgr -a STATE query cluster
v clmgr -a STATE query node nodeA
v clmgr -a STATE query resource_group rg1
v clmgr -a STATE query node nodeA
v clmgr -a STATE query resource_group rg1
Notes
v For the CLASS object of a cluster, the STATE value that is returned is the worst possible status for all
nodes in the cluster. For example, in four node cluster, if one node is experiencing an error, the STATE
value for the cluster is ERROR.
v The value that is returned after running the clmgr -a STATE query command is in the standard
ATTR=VALUE format, for example STATE=OFFLINE. If you need only the value, you can combine
other flags with the -a flag. If you specify the -cSa command, only the VALUE, such as OFFLINE, is
returned. This option works for a single value at a time.
v You can retrieve multiple attributes at one time with the -a flag, such as -a NAME, STATE. The -a flag
is not case-sensitive. For example, the following is acceptable syntax for the clmgr command, clmgr -a
Name, state. The -a flag supports wildcard characters, such as the asterisk (*) and question mark (?).
Details
If the PowerHA SystemMirror software encounters a problem, it is necessary to view the contents of the
cluster that includes settings. To view the cluster, you can use the clmgr query command with options to
requesting specific formats, such as a colon-delimited format or a XML format. The following command
examples use resource groups, but the same rules apply for all object classes.
Notes
v When a target object is not specified with a query option, and the -v verbose flag is not used, a simple
list of objects is displayed.
v When one or more target objects are specified with a query option, all the known attributes or settings
for those objects are displayed. This query option overrides the -v flag.
v When the -v flag is used with the query option, all the known attributes or settings for all known
objects of the specified class are displayed.
v Detailed attributes or settings are displayed in the ATTR=VALUE format by default, one per line. If the
-c flag is specified, all values are displayed on one line in a colon-delimited format. If -x flag is
specified, all attributes and values are displayed in a simple XML format.
Details
Searching the information is difficult when large number of objects are defined for a specified class, such
as resource groups, or when large number of settings are defined within a specified class. Hence, the
clmgr command provides the ability to specify filtering criteria by using the query action.
Examples
clmgr query resource_group CURRENT_NODE=`get_local_nodename`
Notes
v The example shows how to find an object that matches dynamic value. In this case, the command
shows how to obtain the list of all resource groups that are currently running on the local node.
v This filtering capability can be used in combination with the -a flag for powerful and flexible data
retrieval.
The clmgr command does not use any case-sensitive flags or attributes for easier usage. All actions,
classes, and attributes or options can be shortened to either an explicitly named alias (such as start
instead of online, or rg instead of resource_group), or to the fewest number of letters that make them
unique. The following pairs of commands are functionally identical.
Examples
v clmgr query resource_group
clmgr q rg
v clmgr online node nodeA
clmgr start node nodeA
Notes
Commands 15
The shortening of actions and classes is intended when the clmgr command is used interactively within a
terminal. Although these abbreviations can also be used in scripts, it is strongly suggested to use the full
names of both actions and classes in scripts to make the scripts more readable and serviceable code.
Details
Online Help option is always available for the clmgr command. You can also use the built-in help that is
provided by the clmgr command. You can use the help option if an object or value from a known set of
objects or values is required. If an invalid object or value is specified, an error message and a list of
objects or values that are valid for that operation is displayed. The help option can be used to determine
which action, class, or object is needed. The clmgr command provides the following help options:
Examples
v clmgr
v clmgr add
v clmgr add application
v clmgr add application -h
Notes
If you specify the -h flag after either an object class or a set of option pairs, a list of all valid options for
this particular operation is displayed. The -h flag is the only flag in clmgr command that is not required
to be positioned immediately after clmgr command.
clRGinfo command
Purpose
Creates a report that displays the location and state of one or more specified resource groups.
Syntax
clRGinfo [-h][-e]
Description
The clRGinfo command shows the information about all the configured resource groups.
The primary instance of a resource group can be in one of the following states:
Unknown
PowerHA SystemMirror is unable to obtain reliable state information from the Resource
Monitoring and Control (RMC) subsystem when PowerHA SystemMirror is managing the
resources in the resource group.
Online
All resources for this resource group are active.
Offline
The resource group is not active.
Failed Offline
If a node in a cluster is not in the Online state, the resource group that are defined on the node
have a state of Failed Offline. In such a case, the problem is not related to resource group but
the problem is related to the node in the cluster.
A resource group can be in the following transitional state when a cluster event is in progress:
Pending Online
Resources for the resource group are being activated.
Pending Offline
Resources for the resource group are being released.
Ineligible
The resource group is offline and temporarily unable to accept some resource group actions.
Flags
-h Displays the usage message.
-e Displays detailed information about PowerHA SystemMirror resources and resource groups.
Examples
1. The following example shows the report for running the clRGinfo command without specifying any
flag parameters:
-------------------------------------------------------------
Group Name State Node
----------------------------------------------------------------------
rg_1 ONLINE r2r1m1p34
OFFLINE r2r1m1p35
Commands 17
installpha command
Purpose
Checks whether all installation prerequisites are met and installs the IBM® PowerHA SystemMirror for
Linux product.
Syntax
installPHA [--y][--onlyprereqcheck][-l log_file]
Description
The installpha command checks all installation prerequisites for PowerHA SystemMirror for Linux. If the
system passes the check, the installPHA verifies that the license file is available and installs PowerHA
SystemMirror for Linux.
Information about the actions that are performed during the prerequisite verification and the installation
are recorded in a log file. The default log file is /tmp/installPHA.<#>.log, where <#> represents a
sequential number; the highest number identifies the most recent log file.
Flags
--y
The --y flag when used with the installPHA command suppresses the display of license agreement
on standard output. It implies that you have read and accepted the license agreement.
--onlyprereqcheck
The --onlyprereqcheck flag checks whether the prerequisites for PowerHA SystemMirror for Linux
are met. It does not install the product.
-l log_file
You can use the -l flag with the installPHA command to specify a log file path. The log information
that is generated by the installPHA command is logged in the specified log file.
Examples
1. To install the PowerHA SystemMirror for Linux without viewing the license agreement, enter the
following command:
installPHA --y
2. To install the PowerHA SystemMirror for Linux without viewing the license agreement and to
generate an installation log file at the specified path, enter the following command:
installPHA --y -l /installation.log
uninstallpha command
Purpose
Uninstalls all components of the IBM PowerHA SystemMirror for Linux product.
Syntax
uninstallPHA [-l log_file]
Description
The uninstallPHA command checks that the cluster is offline. All components of PowerHA SystemMirror
for Linux are uninstalled in the proper order, and information about the installation is recorded in a log
Typically, you do not need to specify any options for this command. The available options uninstall the
component although the uninstallPHA script is not available in the package directory. To use a different
log file instead of the default log file, use the -l option.
Flags
-l log_file
You can use the -l flag to specify the log file to log the information that is generated by the
uninstallPHA command.
Examples
1. To uninstall the PowerHA SystemMirror for Linux, enter the following command:
uninstallPHA
2. To uninstall the PowerHA SystemMirror for Linux and to save an uninstallation log file at the
specified path, enter the following command:
uninstallPHA -l /uninstallation.log
Commands 19
20 PowerHA SystemMirror for Linux commands
Notices
This information was developed for products and services offered in the US.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program,
or service that does not infringe any IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or
service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can send
license inquiries, in writing, to:
For license inquiries regarding double-byte character set (DBCS) information, contact the IBM Intellectual
Property Department in your country or send inquiries, in writing, to:
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in
any manner serve as an endorsement of those websites. The materials at those websites are not part of
the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you provide in any way it believes appropriate without
incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the
exchange of information between independently created programs and other programs (including this
one) and (ii) the mutual use of the information which has been exchanged, should contact:
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this document and all licensed material available for it are provided
by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or
any equivalent agreement between us.
The performance data and client examples cited are presented for illustrative purposes only. Actual
performance results may vary depending on specific configurations and operating conditions.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
Statements regarding IBM's future direction or intent are subject to change or withdrawal without notice,
and represent goals and objectives only.
All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without
notice. Dealer prices may vary.
This information is for planning purposes only. The information herein is subject to change before the
products described become available.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to actual people or business enterprises is
entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be
liable for any damages arising out of your use of the sample programs.
Each copy or any portion of these sample programs or any derivative work must include a copyright
notice as follows:
Portions of this code are derived from IBM Corp. Sample Programs.
This Software Offering does not use cookies or other technologies to collect personally identifiable
information.
If the configurations deployed for this Software Offering provide you as the customer the ability to collect
personally identifiable information from end users via cookies and other technologies, you should seek
your own legal advice about any laws applicable to such data collection, including any requirements for
notice and consent.
For more information about the use of various technologies, including cookies, for these purposes, see
IBM’s Privacy Policy at http://www.ibm.com/privacy and IBM’s Online Privacy Statement at
http://www.ibm.com/privacy/details the section entitled “Cookies, Web Beacons and Other
Technologies” and the “IBM Software Products and Software-as-a-Service Privacy Statement” at
http://www.ibm.com/software/info/product-privacy.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the web at
Copyright and trademark information at www.ibm.com/legal/copytrade.shtml.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Notices 23
24 PowerHA SystemMirror for Linux commands
Index
Printed in USA