You can use Serviceguard Manager, or Serviceguard commands as shown below, to halt a package.

Using Serviceguard Commands to Halt a Package

Use the cmhaltpkg command to halt a package, as follows:

cmhaltpkg pkg1

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

Moving a Failover Package

You can use Serviceguard Manager, or Serviceguard commands as shown below, to move a failover package from one node to another.

Using Serviceguard Commands to Move a Running Failover Package

Before you move a failover package to a new node, it is a good idea to run cmviewcl -v-lpackage 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” (page 285).

Changing Package Switching Behavior

There are two options to consider:

Whether the package can switch (fail over) or not.

Whether the package can switch to a particular node or not.

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 (page 235). 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.

Changing Package Switching with Serviceguard Commands

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.

286 Cluster and Package Maintenance

Page 286
Image 286
HP Serviceguard manual Moving a Failover Package, Changing Package Switching Behavior