cmrunpkg(1m)cmrunpkg(1m)NAMEcmrunpkg - run a high availability package
SYNOPSIScmrunpkg [-v] [-t] [[-a] | [-n node_name]...] package_name...
cmrunpkg [-v] [-m module_name] [-e exclude_module_name] [-n node_name]
DESCRIPTIONcmrunpkg connects to the Serviceguard cluster manager and runs the
specified package(s) or multi-node package instance(s). Each package or
package instance named by package_name must be in a halted state at the
time cmrunpkg is issued.
To start a package, a user must either be a superuser with effective
user ID of zero (see id(1) and su(1)), or have an access policy of
PACKAGE_ADMIN for the packages specified. See access policy in
cmquerycl(1m) or cmmakepkg(1m).
cmrunpkg may be run on any node within the cluster and may operate on
any package within the cluster. The use of zero or more node_name
arguments will be interpreted differently depending on the package
FAILOVER By default, the package will be run on the node
where the cmrunpkg command was issued. This will
result in an error if that node is not contained in
the package configured node list.
If one node_name argument is provided, the package
will attempt to start on the node specified.
If more than one node_name arguments are specified,
the command will fail.
Also, when dependencies are configured for a
failover package, and if the package has AUTO_RUN
enabled and/or FAILBACK is set to AUTOMATIC, the
package may not start on the node specified in the
MULTI_NODE (HP-UX only)
package will be run on all enabled nodes in the
package's configured node list. Nodes already run‐
ning an instance of the package will be skipped.
If one or more node_name arguments are supplied,
the package will be started on each of the nodes
specified which do not already have the package
running. Any specified node where the package is
already running will be skipped.
SYSTEM_MULTI_NODE (HP-UX only)
package will be run on all nodes in the cluster.
Supplying node_name arguments with this type of
package will result in an error.
cmrunpkg validates its command line prior to starting any package and
returns an error if illegal combinations of node_name and package_name
arguments are encountered.
cmrunpkg will fail if starting a package specified in the command line
will cause another package that is currently running to halt or restart
because of package dependency or package weights.
Each package is run in the order specified on the command line unless a
package contains dependencies on other packages, in which case they are
run in dependency order. To successfully run a package configured with
dependencies, all other packages named in a DEPENDENCY_CONDITION
attribute must either be running or specified on the cmrunpkg command
line if the DEPENDENCY_CONDITION attribute specifies an "up" depen‐
Packages containing a STORAGE_GROUP definition have an implicit depen‐
dency on the configured cluster volume manager (CVM) system multi-node
package (either SG-CFS-pkg or VxVM-CVM-pkg). Thus, the system multi-
node package must be running or specified on the command line when
starting packages containing STORAGE_GROUP definitions (HP-UX only).
If a problem is detected while starting a package, cmrunpkg exits with
an error indication and remaining package_name arguments are not pro‐
When a package is started on a node, the package's run script is exe‐
cuted. The following are the possible exit values from a run script:
0 The package has been successfully started.
1 The package could not be started and the package should not
be restarted on any other node. Switching for this package
2 The package could not be started but the package may be
restarted on another node in the cluster.
cmrunpkg does not modify the current value of the packages global
switching (AUTO_RUN) flag. If a packages AUTO_RUN flag was disabled
prior to running cmrunpkg, it will still be disabled after the packages
run script completes. Use cmmodpkg -e to reenable this flag.
cmrunpkg supports the following options:
-n node_name Act on the specified set of nodes. This option
does not apply to SYSTEM_MULTI_NODE packages,
which must run on all nodes or none. Multiple
node_name arguments may only be specified for
MULTI_NODE packages. It is invalid to specify
both -n and -a options.
-a If the package is a FAILOVER package, Service‐
guard chooses an eligible node from the package's
configured node list to start the package. If
more than one package are specified on the com‐
mand line, the packages may start on different
nodes. Note that if the package has dependen‐
cies, Serviceguard honors the node order of the
packages it depends on. For example, if package
pkgA depends on package pkgB to be up on the same
node, cmrunpkg-a pkgA pkgB, will not start pkgA
if pkgA cannot run on node1 and pkgB with higher
priority prefers to run on node1. Two packages
with different_node or same_node exclusionary
dependencies cannot be specified on the same
cmrunpkg command line without the -a option. If
the package is a MULTI_NODE package, it will be
run on all eligible nodes in the package's con‐
figured node list. Nodes already running an
instance of the package will be skipped. It is
invalid to specify both -n and -a options. -a
option cannot be used with packages in mainte‐
-v Verbose output will be displayed.
-t Test only. Provide an assessment of the package
placement without affecting the current state of
the nodes or packages. This option validates the
node's eligibility with respect to the package
dependencies as well as the external dependencies
such as EMS resources, package subnets, and stor‐
age before predicting any package placement deci‐
Specifies the last module that will be started in
a partial startup of the package (all package
modules in the startup sequence up to and includ‐
ing this one will be started, but the rest will
not). This option is only valid for a package
that is in maintenance mode.
Specifies the name of the module that should be
excluded from the package run sequence. Only one
exclude_module_name can be specified and it must
be a valid module in the package configuration
file with a valid module script associated with
it. This option is only valid for a package that
is in maintenance mode.
RETURN VALUEcmrunpkg returns the following value:
0 Successful completion.
1 Command failed.
2 Command failed due to a transient condition.
A sequence of cmhaltpkg and cmrunpkg commands may be used to move a
package from one node to another. For example, the package may be
halted on one node and then run on a new node, provided that the pack‐
age is enabled for the new node.
To move package package1 to node node1, do the following:
cmrunpkg-n node1 package1
cmmodpkg -e package1 (to enable global package switching, if
To run instances of the multi-node package mnp1 on nodes node1 and
node2, do the following:
cmrunpkg-n node1 -n node2 mnp1
To start a package that is in maintenance mode up to and including a
cmrunpkg-m sg/service pkg1
To start a package that is in maintenance mode up to and including a
specific module but excluding a specific module:
cmrunpkg-m sg/service pkg1 -e sg/package_ip
AUTHORcmrunpkg was developed by HP.
SEE ALSOcmquerycl(1m), cmmakepkg(1m), cmhaltpkg(1m), cmmodpkg(1m),
Requires Optional Serviceguard Software cmrunpkg(1m)