Вы находитесь на странице: 1из 36

IBM PowerHA SystemMirror for Linux

Version 7.2.2

PowerHA SystemMirror for Linux


commands

IBM
IBM PowerHA SystemMirror for Linux

Version 7.2.2

PowerHA SystemMirror for Linux


commands

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

© Copyright IBM Corp. 2017 iii


iv PowerHA SystemMirror for Linux commands
About this document
You can use commands to manage and configure PowerHA® SystemMirror® for Linux clusters. Each
command has syntax and examples.

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.

© Copyright IBM Corp. 2017 v


vi PowerHA SystemMirror for Linux commands
PowerHA SystemMirror for Linux commands
The man commands for PowerHA SystemMirror for Linux are in the /usr/share/man1/ directory.

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

The clmgr command uses the following syntax:


clmgr {[-c|-d <DELIMITER>] [-S] | [-x]}
[-v][-f][-T <#####>]
[-l {error|standard|low|med|high|max}][-a
{<ATTR#1>,<ATTR#2>,...}] <ACTION> <CLASS> [<NAME>]
[-h | <ATTR#1>=<VALUE#1> <ATTR#2>=<VALUE#2> <ATTR#n>=<VALUE#n>]
clmgr {[-c|-d <DELIMITER>] [-S] | [-x]}
[-v][-f] [-T <#####>]
[-l {error|standard|low|med|high|max}][-a {<ATTR#1>,<ATTR#2>,...}]
ACTION={add|modify|delete|query|online|offline|...}
CLASS={cluster|node|network|resource_group|...}

clmgr {-h|-?} [-v] [<ACTION>[ <CLASS>]]


clmgr [-v] help

The clmgr command uses the following basic format:


clmgr <ACTION> <CLASS> [<NAME>] [<ATTRIBUTES...>]

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.

© Copyright IBM Corp. 2017 1


Flags
ACTION
Describes the operation to be performed.

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)

2 PowerHA SystemMirror for Linux commands


v persistent_ip (Alias: pe*, pi)
v application (Alias: ac, app*, as)
v dependency (Alias: de*)
v file_collection (Alias: file_c*, fc)
v snapshot (Alias: sn*, ss, ba*)
v user (Alias: us*, ur)
v group (Alias: gr*, gp)
v equivalency (Alias: eq*)
v nfs_client (Alias: nfs, nfsc, nfs_c*)
v log (Alias: logs)
v smart_assist (Alias: sm*, sa)
NAME
The specific object, of type CLASS, upon which the ACTION flag must be performed.
ATTR=VALUE
An optional flag that has attribute and value pairs that are specific to the ACTION+CLASS combination.
Use these pairs to specify configuration settings or to adjust particular operations.
When this flag is used with the query ACTION flag, the ATTR=VALUE specifications can be used to
perform attribute-based searching and filtering. In which case, you can use simple wildcard
characters. The asterisk (*) wildcard character searches for any characters. For example, if I use a
search term of "HO*" the search results returned are "HOT", "HOST", and "HOSTNAME". The
question mark (?) wildcard character searches for a single character. For example, if I use a search
term of "HA?" the search result returned are "HAT", "HAM".

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.

Syntax for clmgr operations

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

clmgr modify cluster \


[ SPLIT_POLICY={manual|none|tiebreaker} ]
[ TIEBREAKER={disk|nfs} ]
[ DISK_WWID=<#DISK_WWID> ]
[ NFS_SERVER=<#NFS_SERVER> ]
[ NFS_SERVER_MOUNT_POINT=<NFS_SERVER_MOUNT_POINT_PATH> ]
[ NFS_LOCAL_MOUNT_POINT=<NFS_LOCAL_MOUNT_POINT_PATH> ]

4 PowerHA SystemMirror for Linux commands


[ NFS_FILE_NAME=<#NFS_FILE_NAME> ]

modify => change, set


cluster => cl

clmgr offline cluster \


[ STOP_RSCT={no|yes} ]
offline => stop
cluster => cl

clmgr online cluster \


[ MANAGE={auto|manual} ]

online => start


cluster => cl
cluster => clmgr query cluster [ ALL | {CORE,SPLIT} ]

query => get, list, ls, show


cluster => cl

clmgr delete cluster


[ NODES={ALL|<node#1>,<node#n>,...} ]

delete => erase, remove, rm


cluster => cl
clmgr verify cluster
verify => validate
Node
clmgr add node <node>

add => create, make, mk


node => no

clmgr query node {<node>|LOCAL}[,<node#2>,...]

clmgr -v query node


query => get, list, ls, show
node => no

clmgr delete node {<node>[,<node#2>,<node#n>,...] | ALL}

delete => erase, remove, rm


node => no

clmgr online node <node>[,<node#2>,<node#n>,...] \


[ MANAGE={auto|manual} ]
online => start
node => no

clmgr offline node <node>[,<node#2>,<node#n>,...] \


[ MANAGE={offline|move}] \
[ STOP_RSCT={no|yes}]
offline => stop
node => no

Network
clmgr add network <network> \
[TYPE={ether|disk}] \
[PVID={#PVID}] \
[NODES=<node_P1>[,<node_P2>,...]

add => create, make, mk


network => ne, nw

Commands 5
clmgr delete <network>[,<network#2>,<network#n>,...]

delete => erase, remove, rm


network => ne, nw

clmgr query network <network>[,<network#2>,<network#n>,...]

clmgr -v query network

query => get, list, ls, show


network => ne, nw
Interface
clmgr add interface NETWORK= <network>
NODE=<node> \
INTERFACE=<interface>

add => create, make, mk


interface => in, if

clmgr delete interface NETWORK= <network>


NODE=<node>\
INTERFACE=<interface>

delete => erase, remove, rm


interface => in, if
Resource group

clmgr add resource_group <resource_group>[,<rg#2>,...] \


NODES=<node_P1>[,<node_P2>,...] \
[ STARTUP={OFAN|OAAN}] \
[ FALLOVER={FNPN|BO}] \
[ FALLBACK={NFB|FBHN}] \
[ SERVICE_LABEL=ser_ip#1[,ser_ip#2,... ] \
[ APPLICATIONS=app#1[,app#2,...]] \
[ PRIORITY=<0-200>]

add => create, make, mk


resource_group => rg

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>]

modify => change, set


resource_group => rg

6 PowerHA SystemMirror for Linux commands


clmgr query resource_group [ <resource_group>[,<rg#2>,...] ]
# Available options for "clmgr query resource_group":

[ NAME ]
[ CURRENT_NODE ]
[ NODES ]
[ STATE ]
[ TYPE ]
[ PRIORITY ]
[ STARTUP ]
[ FALLOVER ]
[ FALLBACK ]
[ APPLICATIONS ]
[ SERVICE_LABEL ]
[ NESTED_RGS ]

clmgr delete resource_group {<resource_group>[,<rg#2>,<rg#n>,...] | ALL}

delete => erase, remove, rm


resource_group => rg

clmgr online resource_group { <resource_group>[,<rg#2>,<rg#n>,...] | ALL }

online => start


resource_group => rg

clmgr offline resource_group { <resource_group>[,<rg#2>,<rg#n>,...] | ALL }

offline => stop


resource_group => rg

Note: The ALL attribute attempts to bring all resource groups online or offline.

clmgr move resource_group <resource_group>[,<rg#2>,<rg#n>,...]


NODE=<node>
move => mv
resource_group => rg
Persistent IP/Label
clmgr add persistent_ip <persistent_label> \
NETWORK=<network> \
NODE=<node> \
NETMASK=<###.###.###.###0>

add => create, make, mk


persistent_ip => pi

clmgr delete persistent_ip


{<persistent_label>[,<persistent_label#2>,<persistent_label#n>,...] | ALL}

delete => erase, remove, rm


persistent_ip => pi

clmgr modify persistent_ip <persistent_label> \


[ NAME=<new_persistent_label> ] \
[ NETWORK=<new_network> ] \
[ {NETMASK=<###.###.###.###> ]

modify => change, set


persistent_ip => pi

clmgr query persistent_ip [<persistent_label>[,<persistent_label#2>,<persistent_label#n>,...] ]

Commands 7
clmgr -v query persistent_ip

query => get, list, ls, show


persistent_ip => si

Note: The alias for the persistent_ip is pi.


Service IP/Label

clmgr add service_ip <service_ip_label> \


NETWORK=<network> \
NETMASK=<###.###.###.###>

add => create, make, mk


service_ip => si

clmgr modify service_ip <service_label> \


[ NAME=<new_service_label> ] \
[ NETWORK=<new_network> ] \
[ NETMASK=<###.###.###.###> ]

modify => change, set


service_ip => si

clmgr query service_ip <sLabel#1>[,<sLabel#2>,<sLabel#n>,...]

clmgr -v query service_ip

query => get, list, ls, show


service_ip => si

clmgr delete service_ip


{<sLabel#1>[,<Label#2>,<Label#n>,...] | ALL}

delete => erase, remove, rm


service_ip => si

clmgr reset service_ip <service_ip> \


[NODE=<node_name>]

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" ]

clmgr add application <application> \


TYPE=Custom \
STARTSCRIPT="/path/to/start/script" \
STOPSCRIPT="/path/to/stop/script" \
MONITORMETHOD="/program/to/monitor" \
[OWNER="<owner_name>" ] \
[RESOURCETYPE=“1,2” ] \
[STARTCOMMANDTIMEOUT=""] \
[STOPCOMMANDTIMEOUT=""] \
[MONITORCOMMANDTIMEOUT=""] \
[MONITORINTERVAL="1 .. 1024" ] \

8 PowerHA SystemMirror for Linux commands


[CLEANUPMETHOD="</script/to/cleanup>" ] \
[PROTECTIONMODE="0,1" ]

add => create, make, mk


application_=> app

clmgr modify application <application name> \


[ NAME=<new_label> ] \
[ TYPE={Process|Custom} ] \
[ STARTSCRIPT="/path/to/start/script" ] \
[ STOPSCRIPT="/path/to/stop/script" ] \
[ OWNER="<owner_name>" ] \
[ STARTCOMMANDTIMEOUT="" ] \
[ STOPCOMMANDTIMEOUT="" ] \
[ PROTECTIONMODE="0,1 ] \
PROCESS="process_name" \
[ CLEANUPMETHOD="</script/to/cleanup>" ] \
MONITORMETHOD="/program/to/monitor" \
[ MONITORINTERVAL="1 .. 1024" ] \
[ MONITORCOMMANDTIMEOUT="" ] \
[ CLEANUPMETHOD="</script/to/cleanup>" ] \

modify => change, set


application_=> app

clmgr query application <application>[,<app#2>,<app#n>,...]

clmgr -v query application

query => get, list, ls, show


application_=> app

clmgr delete application {<app>[,<app#2>,<app#n>,...] ALL} \

delete => erase, remove, rm


application_=> app

clmgr reset application <application> \


[NODE=<node_name>]

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>]"

add => create, make, mk


dependency => de

clmgr delete dependency {<dependency>[,<dep#2>,<dep#n>,...] |\


ALL}

delete => erase, remove, rm


dependency => de

clmgr query dependency <depname>[,<dep#2>,<dep#n>,...]

clmgr -v query dependency

query => get, list, ls, show


dependency => de

clmgr modify dependency <dependency_name> \

Commands 9
[NAME="<new_label>" ] \
[TYPE={[<DEPENDSON|DEPENDSONANY|STARTAFTER|STOPAFTER|
COLLOCATED|ANTICOLLOCATED|FORCEDDOWNBY|ISSTARTABLE]} ] \
[TARGET="<rg#1>[,<rg#2>,...,<rg#n>]" ]

modify => change, set


dependency => de
File collection
clmgr add file_collection \
<file_collection> \
[ FILES="/path/to/file1,/path/to/file2,..." ] \
[ SYNC_WHEN_CHANGED={no|yes} ] \
[ DESCRIPTION="<file_collection_description>" ] \

add => create, make, mk


file_collection => fi, fc

clmgr delete file_collection {<file_collection>[,<fc#2>,<fc#n>,...] \


| ALL }
delete => erase, remove, rm
file_collection => fi, fc

clmgr modify file_collection \


<file_collection> \
[ NAME="<new_file_collection_label>" ] \
[ ADD="/path/to/file1,/path/to/file2,..." ] \
[ DELETE={"/path/to/file1,/path/to/file2,..."} ] \
[ SYNC_WHEN_CHANGED={no|yes} ] \
[ DESCRIPTION="<file_collection_description>" ]

modify => change, set


file_collection => fi, fc

clmgr query file_collection <file_collection>[,<fc#2>,<fc#n>,...]

clmgr -v query file_collection

query => get, list, ls, show


file_collection => fi, fc

clmgr sync file_collection <file_collection>


Snapshot
clmgr add snapshots <snapshot> \
[ DESCRIPTION="<snapshot_description>" ]

add => create, make, mk


snapshot => sn, ss

clmgr delete snapshot {<snapshot>[,<snapshot#2>,<snapshot#n>,...] | ALL}

delete => erase, remove, rm


snapshot => sn, ss

clmgr manage snapshot restore <snapshot>

manage => mg
snapshot => sn, ss

clmgr modify snapshot <snapshot> \


[ NAME="<new_snapshot_label>" ] \
[ DESCRIPTION="<snapshot_description>" ]

modify => change, set


snapshot => sn, ss

10 PowerHA SystemMirror for Linux commands


clmgr query snapshot <snapshot>[,<snapshot#2>,...]

clmgr -v query snapshot

query => get, list, ls, show


snapshot => sn, ss
Log

clmgr modify log {<log>} \


[ TRACE_LEVEL={default|medium|max} ]

modify => change, set

clmgr query log <log>[,<log#2>,<log#n>]

clmgr query -v log

query => get, list, ls, show

clmgr view log [ {<log>} ] \


[ TAIL=<number_of_trailing_lines> ] \
[ HEAD=<number_of_leading_lines> ] \
view => cat

clmgr manage logs collect \


[ DIRECTORY="<directory_for_collection>" ] \
[ NODES=<node>[,<node#2>,<node#n>,...] ] \

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} ]

add => create, make, mk


user => ur

clmgr delete user {<user_name>[,<user_name#2>,<user_name#n>,...]}

delete => erase, remove, rm


user => ur

clmgr modify 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> ] \

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} ] \

modify => change, set


user => ur

clmgr query user <user>[,<user#2>,...]

clmgr -v query user

query => get, list, ls, show


user => ur
Group
clmgr add group <group_name> \
[ ID=###|upto 4294967294> ] \
[ ADMINISTRATIVE={false|true} ] \
[ USERS=<user#1>[,<user#2>,...] ]

add => create, make, mk


group => gp

clmgr delete group <group_name>

delete => erase, remove, rm


group => gp

clmgr modify group <group_name> \


[ ID=###|upto 4294967294> ] \
[ ADMINISTRATIVE={false|true} ] \
[ USERS=<user#1>[,<user#2>,...] ]

modify => change, set


group => gp

clmgr query group <group>[,<group#2>,...]

clmgr -v query group

query => get, list, ls, show


group => gp
Equivalency
clmgr query equivalency <equivalency_name>

query => get, list, ls, show


NFS Client

clmgr add NFS_client \


<label> \
<REMOTE_DIR=Server:dir> \
<MOUNT_POINT= dir> \

add => create, make, mk

clmgr delete NFS_client <label>

delete => erase, remove, rm

clmgr query nfs_client <nfs_client>[,<nc#2>,<nc#n>,...]


clmgr -v query nfs_client
query => get, list, ls, show

12 PowerHA SystemMirror for Linux commands


Smart Assist
clmgr add smart_assist APPLICATION={SAP_HANA|SAP_ABAP|SAP_JAVA} \
SID=<sid_value> \
INSTANCE=<HDB_instance_name|SCS_instance_name>

clmgr add smart_assist APPLICATION={SAP_APPSERVER} \


SID=<sid_value>

add => create, make, mk


smart_assist => sm, sa

clmgr delete smart_assist

delete => erase, remove, rm


smart_assist => sm, sa

clmgr modify smart_assist APPLICATION={SAP_HANA|SAP_ABAP|SAP_JAVA} \


SID=<sid_value> \
INSTANCE=<HDB_instance_name|SCS_instance_name>

clmgr modify smart_assist APPLICATION={SAP_APPSERVER} \


SID=<sid_value>

modify => change, set


smart_assist => sm, sa

clmgr setup smart_assist APPLICATION={SAP_HANA|SAP_ABAP|SAP_JAVA} \


SID=<sid_value> \
INSTANCE=<instance_name>\
[ MODE={NEW|UPDATE} ]

clmgr setup smart_assist APPLICATION={SAP_APPSERVER} \


SID=<sid_value> \
[ MODE={NEW|UPDATE} ]

smart_assist => sm, sa

clmgr update smart_assist APPLICATION={SAP_HANA|SAP_ABAP|SAP_JAVA} \


SID=<sid_value> \
INSTANCE=<HDB_instance_name|SCS_instance_name>

clmgr update smart_assist APPLICATION={SAP_APPSERVER} \


SID=<sid_value>
smart_assist => sm, sa

clmgr query smart_assist <policy>[,<policy#2>,<policy#n>]

clmgr query -v smart_assist

query => get, list, ls, show


smart_assist => sm, sa

Example: Case sensitivity

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

Example: Creating a resource group

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

Example: Checking status


Details

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 (?).

Example: Viewing all attributes and settings

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.

14 PowerHA SystemMirror for Linux commands


Examples
v clmgr query resource_group
v clmgr query resource_group rg1,rg2
v clmgr -c query resource_group rg1,rg2
v clmgr -x query resource_group rg1,rg2
v clmgr -v query resource_group
v clmgr -cv query resource_group
v clmgr -xv query resource_group

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.

Example: Displaying objects based on some filter or criteria

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.

Example: Simplifying the clmgr command


Details

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.

Example: Help information for the clmgr command

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.

16 PowerHA SystemMirror for Linux commands


Stuck Online
A resource group cannot be stopped by PowerHA SystemMirror, but PowerHA SystemMirror can
bring the resource group to the Stuck Online state.

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

rg_2 ONLINE r2r1m1p34


OFFLINE r2r1m1p35

rg_3 OFFLINE r2r1m1p34


OFFLINE r2r1m1p35

rg_4_con ONLINE r2r1m1p34


ONLINE r2r1m1p35
2. The following example shows the report for running the clRGinfo command along with the -e flag:
clRGinfo -e
----------------------------------------------------------------------------------
Displaying Detailed Information of PowerHA Resources and Resource Groups
----------------------------------------------------------------------------------
Offline IBM.ResourceGroup:SYSTEM_RG_r2r1m1p34 Nominal=Offline
’- Offline IBM.Test:SYSTEM_RG_r2r1m1p34_test TimeToStart=5 TimeToStop=2
’- Offline IBM.Test:SYSTEM_RG_r2r1m1p34_test:r2r1m1p34
Offline IBM.ResourceGroup:SYSTEM_RG_r2r1m1p35 Nominal=Offline
’- Offline IBM.Test:SYSTEM_RG_r2r1m1p35_test TimeToStart=5 TimeToStop=2
’- Offline IBM.Test:SYSTEM_RG_r2r1m1p35_test:r2r1m1p35
Online IBM.ResourceGroup:rg_1 Nominal=Online
’- Online IBM.Application:app_5
|- Offline IBM.Application:app_5:r2r1m1p34
’- Online IBM.Application:app_5:r2r1m1p35
Offline IBM.ResourceGroup:rg_2 Control=Undefined Nominal=Offline
Offline IBM.ResourceGroup:rg_3 Control=Undefined Nominal=Offline
Online IBM.Equivalency:Network0
|- Online IBM.NetworkInterface:eth0:r2r1m1p34
’- Online IBM.NetworkInterface:eth0: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

18 PowerHA SystemMirror for Linux commands


file. The name of the default log file is /tmp/uninstallPHA.<#>.log, where <#> is a sequential number; the
highest number identifies the most recent log file. If the cluster is online, then the uninstallation is
canceled.

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:

IBM Director of Licensing


IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
US

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:

Intellectual Property Licensing


Legal and Intellectual Property Law
IBM Japan Ltd.
19-21, Nihonbashi-Hakozakicho, Chuo-ku
Tokyo 103-8510, Japan

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS"


WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to you.

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:

© Copyright IBM Corp. 2017 21


IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
US

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:

© (your company name) (year).

Portions of this code are derived from IBM Corp. Sample Programs.

© Copyright IBM Corp. _enter the year or years_.

22 PowerHA SystemMirror for Linux commands


Privacy policy considerations
IBM Software products, including software as a service solutions, (“Software Offerings”) may use cookies
or other technologies to collect product usage information, to help improve the end user experience, to
tailor interactions with the end user or for other purposes. In many cases no personally identifiable
information is collected by the Software Offerings. Some of our Software Offerings can help enable you to
collect personally identifiable information. If this Software Offering uses cookies to collect personally
identifiable information, specific information about this offering’s use of cookies is set forth below.

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

© Copyright IBM Corp. 2017 25


26 PowerHA SystemMirror for Linux commands
IBM®

Printed in USA

Вам также может понравиться