|Managing Serviceguard Fifteenth Edition > Chapter 7 Cluster
and Package Maintenance
Managing packages and services involves the following tasks:
Non-root users with the appropriate privileges can perform these tasks. See “Controlling Access to the Cluster” for information about configuring access.
You can use Serviceguard Manager or the Serviceguard command line to perform these tasks.
Ordinarily, when a cluster starts up, the packages configured as part of the cluster will start up on their configured nodes. You may need to start a package manually after it has been halted manually. You can do this either in Serviceguard Manager or on the Serviceguard command line.
If any package has a configured dependency on another package, Serviceguard will start them in order, ensuring that a package will not start until its dependency is met.
You can use Serviceguard Manager, or Serviceguard commands as shown below, to start a package.
The cluster must be running, and if the package is dependent on other packages, those packages must be either already running, or started by the same command that starts this package (see the section that follows, and “About Package Dependencies”.)
Before starting a package, it is a good idea to use the cmviewcl command to check for package dependencies.
You cannot start a package unless all the packages that it depends on are running. If you try, you’ll see a Serviceguard message telling you why the operation failed, and the package will not start.
If this happens, you can repeat the run command, this time including the package(s) this package depends on; Serviceguard will start all the packages in the correct order.
Use the cmrunpkg command to run the package on a particular node, then use the cmmodpkg command to enable switching for the package. For example, to start a failover package:
cmrunpkg -n ftsys9 pkg1
This starts up the package on ftsys9, then enables package switching. This sequence is necessary when a package has previously been halted on some node, since halting the package disables switching.
Use the CFS administration commands listed in Appendix A “Serviceguard Commands”, to start the special-purpose multi-node packages used with CVM and CFS. For example, to start the special-purpose multi-node package for the disk group package ( SG-CFS-DG-id#), use the cfsdgadm command. To start the special-purpose multi-node package for the mount package (SG-CFS-MP-id#) use the cfsmntadm command. Check to see if your package has a dependency; before you can start your dependent package, you must start all the packages it depends on.
You halt a Serviceguard package when you want to bring the package out of use but want the node to continue running in the cluster. You can halt a package using Serviceguard Manager or on the Serviceguard command line.
Halting a package has a different effect from halting the node. When you halt the node, its failover packages may switch to adoptive nodes (assuming that switching is enabled for them); when you halt a failover package, it is disabled from switching to another node, and must be restarted manually on another node or on the same node.
System multi-node packages run on all cluster nodes simultaneously; halting these packages stops them running on all nodes. A multi-node package can run on several nodes simultaneously; you can halt it on all the nodes it is running on, or you can specify individual nodes.
Before halting a package, it is a good idea to use the cmviewcl command to check for package dependencies.
You cannot halt a package unless all the packages that depend on it are down. If you try, you’ll see a Serviceguard message telling you why the operation failed, and the package will remain up.
If this happens, you can repeat the halt command, this time including the dependent package(s); Serviceguard will halt all the packages in the correct order. First, use cmviewcl to be sure that no other running package has a dependency on any of the packages you are halting.
You can use Serviceguard Manager, or Serviceguard commands as shown below, to halt a package.
Use the cmhaltpkg command to halt a package, as follows:
This halts pkg1, and, if pkg1 is a failover package, also disables it from switching to another node.
You cannot halt a package unless all packages that depend on it are down. If you try, Serviceguard will take no action, except to send a message indicating that not all dependent packages are down. Before you halt a system multi-node package, or halt all instances of a multi-node package, halt any packages that depend on them
You can use Serviceguard Manager, or Serviceguard commands as shown below, to move a failover package from one node to another.
Before you move a failover package to a new node, it is a good idea to run cmviewcl -v -l package and look at dependencies. If the package has dependencies, be sure they can be met on the new node.
To move the package, first halt it where it is running using the cmhaltpkg command. This action not only halts the package, but also disables package switching.
After it halts, run the package on the new node using the cmrunpkg command, then re-enable switching as described under “Using Serviceguard Commands to Start a Package”.
There are two options to consider:
For failover packages, if package switching is set to NO the package cannot move to any other node; if node switching is set to NO, the package cannot move to that particular node. For multi-node packages, if package switching is set to NO, the package cannot start on a new node joining the cluster; if node switching is set to NO, the package cannot start on that node.
Both node switching and package switching can be changed dynamically while the cluster is running. The initial setting for package switching is determined by the auto_run parameter, which is set in the package configuration file (see “auto_run”). If auto_run is set to yes, then package switching is enabled when the package first starts. The initial setting for node switching is to allow switching to all nodes that are configured to run the package.
You can use Serviceguard Manager to change package switching behavior, or Serviceguard commands as shown below.
You can change package switching behavior either temporarily or permanently using Serviceguard commands. To temporarily disable switching to other nodes for a running package, use the cmmodpkg command. For example, if pkg1 is currently running, and you want to prevent it from starting up on another node, enter the following:
cmmodpkg -d pkg1
This does not halt the package, but will prevent it from starting up elsewhere.
You can disable package switching to particular nodes by using the -n option of the cmmodpkg command. The following prevents pkg1 from switching to node lptest3:
cmmodpkg -d -n lptest3 pkg1
To permanently disable switching so that the next time the cluster restarts, the change you made in package switching is still in effect, change the auto_run flag in the package configuration file, then re-apply the configuration. (See “Reconfiguring a Package on a Running Cluster ”.)