Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Managing Serviceguard Twelfth Edition > Chapter 7 Cluster and Package Maintenance

Managing Packages and Services

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Managing packages and services involves the following tasks:

  • Starting a Package

  • Halting a Package

  • Moving a Package (halt, then start)

  • Changing Package Switching Behavior

In Serviceguard A.11.16 and later, these commands can be done by non-root users, according to access policies in the cluster’s configuration files. See “Editing Security Files ”, for more information about configuring access.

You can use Serviceguard Manager or the Serviceguard command line to perform these tasks.

Starting a Package

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 dependencies on another package, Serviceguard will start them in order, ensuring that a package will not start until its dependency is met.

Using Serviceguard Manager to Start a Package

To start a failover package, right-click it to display the Admin menu. You can let Serviceguard start the failover package on its default configured node, or you can specify a node in the package node list.

To start a system multi-node package, right-click its cluster symbol to display the menu. Serviceguard starts system multi-node packages on every node active in the cluster.

From the menu, select “Run package <pkgname>” or “Run package <pkgname> on node...” with a select list of running eligible nodes from which you can choose the node on which the package should start.

The progress window shows messages as the action takes place. This will include messages for starting the package.

The cluster must be running in order to start a package.

Using Serviceguard Commands to Start a Package

Use the cmrunpkg command to run the package on a particular node, then use the cmmodpkg command to enable switching for the package. Example, for a failover package:

cmrunpkg -n ftsys9 pkg1 
cmmodpkg -e 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 admin commands, listed in Appendix A, 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.

Halting a Package

You halt a Serviceguard package when you wish to bring the package out of use but wish the node to continue in operation. You can halt a package using Serviceguard Manager or on the Serviceguard command line. Halting a package has a different effect than 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 them on all the nodes where they are running, or you can specify individual nodes.

You cannot halt a package unless all the packages that depend on it are down. If you try, Serviceguard will send a message telling why it cannot complete the operation. If this happens, you can repeat the halt command, this time including the dependency package(s); Serviceguard will halt the all the listed 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.

Using Serviceguard Manager to Halt a Package

Select the package you wish to halt; for system multi-node or multi-node packages, select their cluster. Right-click to display the action list. Select “Halt package <pkgname>.” The package must be running. No other packages should have a configured dependency on the package you want to halt. To see package dependency information, open the package’s properties.

The progress window shows messages as the action takes place. This will include a message about successfully halting the package, or a message about why Serviceguard cannot halt the package.

Using Serviceguard Commands to Halt a Package

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

cmhaltpkg pkg1 

This halts pkg1. If pkg1 is a failover package, it will also disables it from switching to another node. 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 packages that depend on it are down. If you try, Serviceguard will take no action, except to send a message indicating that not all dependency 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 to move a failover package from one node to another.

Using Serviceguard Manager to Move a Failover Package

The package must be running to start the operation. It is a good idea to check properties to be sure that the package’s dependencies can be met on the new node.

You can select the package on the map or tree and drag it with your mouse to another cluster node. Or, select the icon of the package you wish to halt, and right-click to display the action list. Select “Move package to node.” Or, select the package and go to the toolbar menu and choose Actions -> Administering.

The Operation Log window shows messages as the action takes place. This will include a message for halting the package and another for starting it on the destination node.

After moving, you may want to change the switching flags. You can do this from the Actions menu, or the right-click popup menu.

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 use the cmviewcl -v -l package command and look at dependencies. If the package has dependencies, be sure they can be met on the new node.

To move the package, you first halt it where it is running using the cmhaltpkg command. This action not only halts the package, but also disables switching the package back to the node on which it halts.

After it halts, you run the package on the new node using the cmrunpkg command. Then re-enable switching. cmmodpkg can be used with the -n option to enable a package to run on a node if the package has been disabled from running on that node due to some sort of error. If no node is specified, the node the command is run on is the implied node.

Example:

cmhaltpkg pkg1  
cmrunpkg -n ftsys10 pkg1 
cmmodpkg -e pkg1 

Changing the Switching Behavior of Failover Packages

There are two types of switching flags:

  • package switching is enabled (YES) or disabled (NO) for the package.

  • node switching is enabled (YES) or disabled (NO) on individual nodes.

For failover packages, if package switching is NO the package cannot move to any other node. If node switching is NO, the package cannot move to that particular node.

For multi-node packages, if package switching is NO, the package cannot start on a new node joining the cluster. If node switching is 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. If AUTO_RUN is set to YES, then package switching is enabled initially when the package first starts in the cluster.

The initial setting for node switching is to allow switching to all nodes that are configured to run the package.

Changing Package Switching with Serviceguard Manager

To change package switching or node switching in Serviceguard Manager, select the package on the tree or map. Either right-click it or go to the toolbar Actions menu. Click on the radio button to change between enabled or disabled. You can set node switching node by node

Note that if the package is currently running on a node, and you disable switching of the package to that node, the package continues running, but it will not be able to switch back to the node at a later time.

To change the AUTO-RUN parameter, you need to reconfigure the package. This is only available for Serviceguard A.11.16 or later. Select the package, then choose Configuring from the Actions menu (on toolbar or right-click menu). As on the command line, you need root permission on the cluster to create or modify configuration.

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 disable its ability to start up on another node, enter the following:

# cmmodpkg -d pkg1

This does not halt the package, but it will prevent the package from starting up elsewhere.

You can also disable package switching to particular nodes by using the -n option of the cmmodpkg command. The following disables the ability of pkg1 to switch 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, you must change the AUTO_RUN flag in the package configuration file, then re-apply the configuration. (Any change made this way will take effect the next time the cluster is restarted.)

See the next section “Reconfiguring a Package on a Running Cluster” for more conditions about reconfiguration.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.