Creating the package configuration  Creating the package control script

Chapter 7: Configuring Adaptive Server for Failover on HP

Editing the ASE_HA.sh script

The ASE_HA.sh template script configures the high availability system to start, stop, and monitor Adaptive Server for failover. The ASE_HA.sh template script is included in the $SYBASE/$SYBASE_ASE/install directory. Make a copy of this script in the package subdirectory you created in step 1 in the previous section, and modify it to include the environment variables for your cluster environment. Both the primary and secondary companions require a copy of this script. As “root,” perform the following steps:

  1. If you are currently using a script to configure Adaptive Server applications to run in your high availability system, make a backup copy of this file. For example, if you have a script named SYBASE1.sh, copy it to SYBASE1.sh.backup.

  2. On the primary node, change to the package subdirectory under /etc/cmcluster. For example, if you are configuring the primary companion MONEY1:

    cd /etc/cmcluster/MONEY1
    
  3. Copy the ASE_HA.sh template script from the $SYBASE/$SYBASE_ASE/install directory to the primary companion’s package subdirectory. Use the following syntax for the package template name:

    <package_name>.sh
    

    where package_name is the name of the companion server you are configuring. For example, to make a copy of the ASE_HA.sh file for MONEY1:

    cp ASE_HA.sh /etc/cmcluster/MONEY1/MONEY1.sh
    
  4. Edit the server_name.sh file for your environment. Edit the lines that include “__FILL_IN__” (and any other lines that require editing for your site). This is a list of these lines:

    Table 7-1 shows the ASE_HA.sh settings in MONEY1.sh for the primary companion MONEY1 running on host FN1, and for the secondary companion PERSONNEL1, running on host HUM1. Both use a local file system. During failover, MONEY1 restarts on HUM1 if PERSONNEL1 is not running or not in companion mode.

    Table 7-1: Settings for MONEY1 in the ASE_HA.sh script

    Variable

    Setting

    ASE_12_0

    yes

    ASE_HAFAILOVER

    yes

    BASIC_FAILOVER

    yes

    PACKAGE_NAME

    MONEY1

    MONITOR_INTERVAL

    5

    SHUTDOWN_TIMEOUT

    60

    RECOVERY_TIMEOUT

    300

    SYBASE_ASE

    ASE-15_0

    SYBASE_OCS

    OCS-15_0

    HALOGIN

    “SA”

    HAPASSWD

    “Odd2Think”

    PRIM_ASE_HOME

    Defaults to directory $SYBASE/$SYBASE_ASE

    PRIM_SYBASE

    /opt/sybase

    PRIM_SERVER

    MONEY1

    PRIM_HOSTNAME

    FN1

    PRIM_CONSOLE_LOG

    $PRIM_SYBASE/$SYBASE_ASE/install/MONEY1.cs_log

    PRIM_RUNSCRIPT

    Name of RUNSERVER file – default to $SYBASE/$SYBASE_ASE/install/RUN_<servername>

    SYBASE

    PRIM_SYBASE for primary and SEC_SYBASE if on the secondary host. Automatically set.

    SEC_ASE_HOME

    Default $SYBASE/$SYBASE_ASE

    SEC_SYBASE

    /opt/sybase

    SEC_SERVER

    PERSONNEL1

    SEC_HOSTNAME

    HUM1

    ISQL

    Default $SYBASE/$SYBASE_OCS/bin/isql

    SEC_CONSOLE_LOG

    $PRIM_SYBASE/$SYBASE_ASE/install/PERSONNEL1.cs_log

  5. Change the permission on the file to 700 so it is only readable, writable, and executable by “root”. For example, to change permissions for MONEY1.sh, enter:

    chmod 700 MONEY1.sh
    
  6. Distribute the script to the secondary node. For example, to distribute the file to the secondary node HUM1:

    rcp /etc/cmcluster/MONEY1/MONEY1.sh HUM1:/etc/cmcluster/MONEY1/MONEY1.sh
    
  7. Repeat the above steps for the secondary companion.

    The secondary companion package script uses values for PRIM_SERVER, PRIM_HOSTNAME, PRIM_SYBASE, SEC_SERVER, SEC_HOSTNAME, and SEC_SYBASE that are the opposite of the primary companion package script. Table 7-2 shows values for PERSONNEL1.sh.

    Table 7-2: Settings for PERSONNEL1 in the ASE_HA.sh script

    Variable

    Setting

    ASE_12_0

    yes

    ASE_HAFAILOVER

    yes

    BASIC_FAILOVER

    yes

    PACKAGE_NAME

    PERSONNEL1

    MONITOR_INTERVAL

    5

    SHUTDOWN_TIMEOUT

    60

    RECOVERY_TIMEOUT

    300

    SYBASE_ASE

    ASE-15_0

    SYBASE_OCS

    OCS-15_0

    HALOGIN

    “SA”

    HAPASSWD

    “Odd2Think

    PRIM_SYBASE

    /opt/sybase

    PRIM_SERVER

    PERSONNEL1

    PRIM_HOSTNAME

    HUM1

    PRIM_CONSOLE_LOG

    $PRIM_SYBASE/$SYBASE_ASE/install/MONEY1.cs_log

    PRIM_RUNSCRIPT

    Name of RUNSERVER file – default to $SYBASE/$SYBASE_ASE/install/RUN_<servername>

    SEC_SYBASE

    /opt/sybase

    SEC_SERVER

    MONEY1

    EC_HOSTNAME

    FN1

    SEC_CONSOLE_LOG

    $PRIM_SYBASE/$SYBASE_ASE/install/PERSONNEL1.cs_log





Copyright © 2005. Sybase Inc. All rights reserved. Creating the package control script

View this book as PDF