Creating the package configuration

The package configuration process defines the Adaptive Server and associated resources run by the package manager when a package starts on a node in the cluster. The package configuration also includes a prioritized list of cluster nodes on which the package runs, and defines the types of failover the package allows. You must define a package for each companion server.

NoteThe name of the Adaptive Server specified in the interfaces file must be the same as the name of the HP MC/ServiceGuard package.

For example, you might create a package named MONEY1 for primary companion MONEY1 and another package named PERSONNEL1 for secondary companion PERSONNEL1.

NoteYou can use either SAM or MC/ServiceGuard commands to create and customize your package configuration file. See the HP MC/ServiceGuard document for information on how to use SAM to perform these operations. This document describes the steps uses MC/ServiceGuard commands.

As “root,” perform the following steps for both the primary and secondary companions:

  1. Create a subdirectory on the primary node in the /etc/cmcluster directory to contain the package information for your primary companion. For example, to create a directory for primary companion MONEY1:

    mkdir /etc/cmcluster/MONEY1
    
  2. Change the permissions for this directory so it is accessible only by “root”:

    chmod 700 /etc/cmcluster/MONEY1
    
  3. Create the same subdirectory on the secondary node. For example, to create this directory on machine FN1 for primary companion MONEY1:

    rsh FN1 "mkdir /etc/cmcluster/MONEY1"
    
  4. Change the permissions for this directory so it is only accessible by “root”:

    rsh FN1 chmod 700 /etc/cmcluster/MONEY1
    
  5. Generate a package configuration template for the primary companion using the cmmakepkg command:

    /usr/sbin/cmmakepkg -p /etc/cmcluster/subdirectory_name/companion_name.ascii
    
    • where subdirectory_name is the name of the subdirectory you created in step 1,

    • companion_name is the name of the companion for which you are configuring the package.

    For example, to create a package configuration template for primary companion, MONEY1:

    /usr/sbin/cmmakepkg -p /etc/cmcluster/MONEY1/MONEY1.ascii
    
  6. Edit the configuration template file you just created so it specifies the package name, a prioritized list of nodes, the location of the control script, and the failover parameters for each package.

    The following are the edits made to the MONEY1.ascii configuration file (your changes will differ, depending on your machine names and parameters):

    PACKAGE_NAME                     MONEY1
    FAILOVER_POLICY                  CONFIGURED_NODE
    FAILBACK_POLICY                  MANUAL
    NODE_NAME                        FN1
    NODE_NAME                        HUM1
    RUN_SCRIPT                       /etc/cmcluster/MONEY1/MONEY1.cntl
    HALT_SCRIPT                      /etc/cmcluster/MONEY1/MONEY1.cntl
    SERVICE_NAME                     MONEY1
    SERVICE_FAIL_FAST_ENABLED        NO
    SERVICE_HALT_TIMEOUT             300
    

Copy the configuration file to the subdirectory on the second node you created in step 3. For example, to copy the MONEY1.ascii file using rcp:

rcp /etc/cmcluster/MONEY1/MONEY1.ascii HUM1:/etc/cmcluster/MONEY1/MONEY1.ascii