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

Reconfiguring a Package

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The process of reconfiguration of a package is somewhat like the basic configuration described in Chapter 6. Refer to that chapter for details on the configuration process.

The cluster can be either halted or running during package reconfiguration. The types of changes that can be made and the times when they take effect depend on whether the package is running or not.

If you reconfigure a package while it is running, it is possible that the package could fail later, even if the cmapplyconf succeeded. For example, consider a package with two volume groups. When this package started, it activated both volume groups. While the package is running, you could change its configuration to list only one of the volume groups, and cmapplyconf would succeed. If you issue cmhaltpkg command, however, the halt would fail. The modified package would not deactivate both of the volume groups that it had activated at startup, because it would only see the one volume group in its current configuration file.

Reconfiguring a Package on a Halted Cluster

You can also make permanent changes in package configuration while the cluster is not running. Use the following steps:

  • On one node, reconfigure the package as described earlier in this chapter. You can do this by using Serviceguard Manager or by editing the package ASCII file.

  • Edit the package control script directly if not in Serviceguard’s guided mode (in guided mode, Serviceguard manager does it automatically at reconfiguration). Any changes in service names will also require changes in the package configuration file.

  • Click the Apply button in Serviceguard Manager, or enter cmapplyconf on the command line. This copies the binary cluster configuration file to all nodes. On the command line, use the -P option, specifying the package to be changed; do not use the -C option. This file overwrites any previous version of the binary cluster configuration file.

  • Copy the modified control script to all nodes that can run the package. (Done automatically in Serviceguard Manager as part of Apply.)

  • Use the Serviceguard Manager Run Cluster command, or enter cmruncl on the command line to start the cluster on all nodes or on a subset of nodes, as desired. The package will start up as nodes come online.

Reconfiguring a Package on a Running Cluster

You can reconfigure a package while the cluster is running, and in some cases you can reconfigure the package while the package itself is running. Only certain changes may be made while the package is running.

To modify the package in Serviceguard Manager, select it and then choose Configuring Serviceguard from the Actions menu. When the configuration window opens, choose options as described in Chapter 6. Alternatively, with HP-UX commands, use the following procedure (pkg1 is used as an example):

  1. Halt the package if necessary:

    cmhaltpkg  pkg1 

    See Table 7-2 “Types of Changes to Packages ” to determine whether this step is needed.

  2. If it is not already available, you can obtain a copy of the package's ASCII configuration file by using the cmgetconf command, specifying the package name.

    cmgetconf -p pkg1 pkg1.ascii 
  3. Edit the ASCII package configuration file.

  4. Verify your changes as follows:

    cmcheckconf -v -P pkg1.ascii 
  5. Distribute your changes to all nodes:

    cmapplyconf -v -P pkg1.ascii 
  6. Copy the package control script to all nodes that can run the package.

Adding a Package to a Running Cluster

You can create a new package and add it to the cluster configuration while the cluster is up and while other packages are running. The number of packages you can add is subject to the value of Maximum Configured Packages in the cluster configuration file.

To create the package, follow the steps given in the chapter Chapter 6 “Configuring Packages and Their Services ” If you are using the Serviceguard command line, however, do not specify the cluster ASCII file when verifying and distributing the configuration with HP-UX commands. For example, to use HP-UX commands to verify the configuration of newly created pkg1 on a running cluster:

cmcheckconf -P /etc/cmcluster/pkg1/pkg1conf.ascii 

Use an HP-UX command like the following to distribute the new package configuration to all nodes in the cluster:

cmapplyconf -P /etc/cmcluster/pkg1/pkg1conf.ascii 

Remember to copy the control script to the /etc/cmcluster/pkg1 directory on all nodes that can run the package.

To create the CFS disk group or mount point multi-node packages, refer to “Creating the Disk Group Cluster Packages” and “Creating File Systems ”.

Deleting a Package from a Running Cluster

Serviceguard will not allow you to delete a package if any other package is dependent on it. To check for dependencies, use the cmviewcl -v -l package command. System multi-node packages cannot be deleted from a running cluster.

Serviceguard Manager can create and modify configuration of failover packages only. Select the package; from the Admin menu, select Halt <package>. Then select the cluster; from the Actions menu, choose Configuring Serviceguard -> Delete Package.

On the Serviceguard command line, you can delete most packages from all cluster nodes by using the cmdeleteconf command. To delete one of the Cluster File System packages, use the cfscluster, cfsdgadm, or cfsmntadm command. The command can only be executed when the package is down; the cluster may be up. This removes the package information from the binary configuration file on all the nodes in the cluster.

The following example halts the failover package mypkg and removes the package configuration from the cluster:

cmhaltpkg mypkg 
cmdeleteconf -p mypkg 

The command prompts for a verification before deleting the files unless you use the -f option. The directory /etc/cmcluster/mypkg is not deleted by this command.

You can remove nodes from a multi-node package configuration using the cfs commands listed in Appendix A. All the packages that depend on the multi-node package must be halted on that node.

To remove the CFS mount point and disk group packages, follow these steps:

  1. Remove any dependencies on the package being deleted. Delete DEPENDENCY parameters from the failover application package ascii file, then apply the modified configuration file:
    # cmapplyconf -v -P app1.config

  2. Unmount the shared file system
    # cfsumount <mount point>

  3. Remove the mount point package from the cluster
    # cfsmntadm delete <mount point>

    This disassociates the mount point from the cluster. When there is a single VG associated with the mount point, the disk group package will also be removed

  4. Remove the disk group package from the cluster. This disassociates the disk group from the cluster.
    # cfsdgadm delete <disk group>

NOTE: Any form of the mount command (for example, mount -o cluster, dbed_chkptmount, or sfrac_chkptmount) other than cfsmount or cfsumount in a HP Serviceguard Storage Management Suite environment with CFS should be done with caution. These non-cfs commands could cause conflicts with subsequent command operations on the file system or Serviceguard packages. Use of these other forms of mount will not create an appropriate multi-node package which means that the cluster packages are not aware of the file system changes.

Resetting the Service Restart Counter

The service restart counter is the number of times a package service has been automatically restarted. This value is used to determine when the package service has exceeded its maximum number of allowable automatic restarts.

NOTE: Any form of the mount command (for example, mount -o cluster, dbed_chkptmount, or sfrac_chkptmount) other than cfsmount or cfsumount in a HP Serviceguard Storage Management Suite environment with CFS should be done with caution. These non-cfs commands could cause conflicts with subsequent command operations on the file system or Serviceguard packages. Use of these other forms of mount will not create an appropriate multi-node package which means that the cluster packages are not aware of the file system changes.

When a package service successfully restarts after several attempts, the package manager does not automatically reset the restart count. However, you may choose to reset the counter online using the cmmodpkg -R -s command, thus enabling the service in future restart situations to have the full number of restart attempts up to the configured SERVICE_RESTART count. Example:

# cmmodpkg -R -s myservice pkg1

The current value of the restart counter may be seen in the output of the cmviewcl -v command.

Allowable Package States During Reconfiguration

All nodes in the cluster must be powered up and accessible when making configuration changes.

Refer to Table 7-2 “Types of Changes to Packages ” to determine whether or not the package may be running while you implement a particular kind of change. Note that for all of the following cases the cluster may be running, and also packages other than the one being reconfigured may be running.

Table 7-2 Types of Changes to Packages

Change to the Package

Required Package State

Add a new package

Other packages may be in any state.

Delete a package

Package must not be running. You cannot delete package if another package has a configured dependency on it.

Add a service

Package must not be running.

Remove a service

Package must not be running.

Add a subnet

Package must not be running. Subnet must already be configured into the cluster.

Remove a subnet

Package must not be running.

Add a resource

Package must not be running.

Remove a resource

Package must not be running.

Add a volume group

Volume group may be configured into the cluster while the cluster is running. The package may be in any state, because the change is made in the control script. However, the package must be halted and restarted for the change to have an effect.

Remove a volume group

Package must not be running.

Change run script contents

It is recommended that the package be halted. If the run script for the package is modified while the package is running, timing may cause problems.

Change halt script contents

It is recommended that the package be halted. If the halt script for the package is modified while the package is running, timing may cause problems.

Script timeouts

Package may be either running or halted.

Service timeouts

Package must not be running.

Service failfast

Package must not be running.

Package AutoRun

Package may be either running or halted.

Local LAN Failover

Package may be either running or halted.

Change the order of nodes where a package may run

Package may be either running or halted.

Change the Package Failover PolicyPackage may be either running or halted.
Change the Package Failback PolicyPackage may be either running or halted.

Change access policy

Package may be either running or halted.

Add or delete a configured dependency

Both packages may be either running or halted with one exception:
If a running package adds a dependency, the dependency package must already be running on the same node(s).

Adding CFS Packages

To add an SG-CFS-DG-id# disk group package, the SG-CFS-pkg Cluster File System package must be up and running.

To add an SG-MP-id# mount point package to a node, the SG-DG-id# disk group package must be up and running on that node.

 

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