Hitachi

Hitachi Advanced Database Setup and Operation Guide


17.3.4 Setting up an HA Monitor environment

Set up an HA Monitor environment in the active system and the standby system. For details about how to set up an HA Monitor environment, see System Configuration in the manual HA Monitor for Linux(R) (x86).

This subsection provides notes on setting up an HA Monitor environment.

Organization of this subsection

(1) Setting environment variables

Set the following HADB administrator environment variable:

(2) Specifying settings in the sysdef file

Among the operands that you need to specify for HA Monitor's sysdef file, the values to specify are predetermined for the following operands:

For details about the above operands, see HA Monitor environment settings (sysdef) in the manual HA Monitor for Linux(R) (x86).

(3) Specifying the servers file

Among the operands that you need to specify for HA Monitor's servers file, the values to specify are predetermined for the following operands:

For details about the preceding operands specified in the servers file, see Server environment definition (servers) in the manual HA Monitor for Linux(R) (x86).

(4) Creating environment variable definitions for commands, and creating commands

To link to HA Monitor, create environment variable definitions for commands, and create the following commands:

Templates for environment variable definitions for commands, as well as the above commands, are located under $ADBDIR/sample/scripts. Create the commands based on the templates.

(a) Creating environment variable definitions for commands

$ADBDIR/sample/scripts/coldstandby.env is the template. Copy this template and correct the following locations:

  • Environment variable ADBMGR

    Specify the user name of the HADB administrator (OS user).

(b) Creating a server startup command

$ADBDIR/sample/scripts/coldstandby_act.sh is the template. Copy this template and correct the following location:

  • source statement

    Specify for the argument of the source statement the absolute path for the file that specifies the environment variable definitions for commands.

(c) Creating a server termination command

$ADBDIR/sample/scripts/coldstandby_term.sh is the template. Copy this template and correct the following location:

  • source statement

    Specify for the argument of the source statement the absolute path for the file that specifies the environment variable definitions for commands.

(d) Creating a server-monitoring command

$ADBDIR/sample/scripts/coldstandby_patrol.sh is the template. Copy this template and correct the following location:

  • source statement

    Specify for the argument of the source statement the absolute path for the file that specifies the environment variable definitions for commands.

(5) File specification examples (when using host reset)

This subsection provides specification examples for the following files. The following are specification examples when you are using host reset.

The specification examples explained here assume the system configuration shown in Figure 17‒1: Example of a system configuration using the cold standby configuration.

(a) sysdef file specification examples

■ Specification example of the sysdef file for server machine hadb01 (active system)
environment  name hadb01,
             address 1,                 ...1
             patrol 60,
             lan path11,                ...2
             lanport HAmon1;            ...3
function     pathpatrol 240,
             connect_retry 5:200,
             monbegin_restart nouse,
             termcmd_at_abort nouse;

Explanation

  1. Specifies the order of priority for resetting hosts. Because this host is the active system, its reset priority needs to be the highest, so 1 is specified.

  2. Specify the host name of the LAN that is used for HA Monitor's monitoring path. Specify host name path11, which corresponds to IP address 172.16.0.11.

  3. Specify the service name of the LAN that is used for HA Monitor's monitoring path. Specify service name HAmon1, which corresponds to port number 7777.

■ Specification example of the sysdef file for server machine hadb02 (standby system)
environment  name hadb02,
             address 2,                 ...1
             patrol 60,
             lan path21,                ...2
             lanport HAmon1;            ...3
function     pathpatrol 240,
             connect_retry 5:200,
             monbegin_restart nouse,
             termcmd_at_abort nouse;

Explanation

  1. Specifies the order of priority for resetting hosts. This host is the standby system, so specify 2.

  2. Specify the host name of the LAN that is used for HA Monitor's monitoring path. Specify host name path21, which corresponds to IP address 172.16.0.12.

  3. Specify the service name of the LAN that is used for HA Monitor's monitoring path. Specify service name HAmon1, which corresponds to port number 7777.

(b) servers file specification examples

The examples described here assume that you are using ext4 as the file system. If you are using a file system other than ext4, the OS mount command options will differ from those in the examples shown here.

■ Specification example of the servers file for server machine hadb01 (active system)
server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,   ...9
       fs_neck use:nouse:nouse:use,   ...10
       initial online;                ...11

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify online to make this system the active system.

■ Specification example of the servers file for server machine hadb02 (standby system)
server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,   ...9
       fs_neck use:nouse:nouse:use,   ...10
       initial standby;               ...11

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify standby to make this system the standby system.

(c) Specification example of a file for environment variable definitions for commands

In this example, environment variable definitions for commands are stored in /HADB/scripts/coldstandby.env. Specify the same settings for the active system and the standby system.

■ Specification example of the file for environment variable definitions for commands
# The environment variables for HADB
export ADBMGR=adbmanager                     ...1
export ADBDIR=/HADB/server                   ...2
export ADBINFODIR=/HADB/adbinfo              ...3

Explanation

  1. Specify user name adbmanager for the HADB administrator (OS user).

  2. Specify the absolute path for the server directory.

  3. Specify the absolute path for the directory for storing troubleshooting-information files.

(d) Specification example of the server startup command file

In this example, the server startup command is stored in /HADB/scripts/coldstandby_act.sh. Specify the same settings for the active system and the standby system.

■ Specification example of the server startup command file
#!/bin/sh

# Sample of the actcommand for HADB

SU=/bin/su
ECHO=/bin/echo

# Setting environment variables for HADB
source /HADB/scripts/coldstandby.env       ...1

# Execute adbstart command
$SU - $ADBMGR -c "$ECHO y|$ADBDIR/bin/adbstart"

# always 0 return
exit 0

Explanation

  1. For the source statement, specify the absolute path for the file for environment variable definitions for commands (/HADB/scripts/coldstandby.env).

(e) Specification example of the server termination command file

In this example, the server termination command is stored in /HADB/scripts/coldstandby_term.sh. Specify the same settings for the active system and the standby system.

■ Specification example of the server termination command file
#!/bin/sh

# Sample of the termcommand for HADB

STS_ACTIVE="ACTIVE"
STS_STOP="STOP"
STS_STARTING="STARTING"
STS_STOPPING="STOPPING"
STS_ABORT="ABORT"
STS_QUIESCE="QUIESCE"
STS_OFFLINE="OFFLINE"
STS_CHGMODE="CHGMODE"
STS_STOPWAIT="STOPWAIT"
STS_COREDUMP="COREDUMP"
STS_FORCE="FORCE"
STS_MAINTNCE="MAINTNCE"

AWK=/bin/awk
ECHO=/bin/echo
PS=/bin/ps
KILL=/bin/kill
GREP=/bin/grep
SU=/bin/su
READLINK=/bin/readlink

# Setting environment variables for HADB
source /HADB/scripts/coldstandby.env       ...1

# Resolve the path for adbsrvd
ADBSRVD=`$READLINK -e $ADBDIR/bin/adbsrvd`
if [ $? -ne 0 ]
then
  exit 0
fi

# Execute adbstop command
GET_STS=`$SU - $ADBMGR -c "$ADBDIR/bin/adbls -d srv 2>/dev/null" | $GREP -v SVID | $AWK '{ if ($1 ~ /[0-9]+/) { print $2 } else { print $1 } }'`

case "$1" in
"-e" )
  # Normal stop operations of active system.
  # (when the monend command is executed.)
  if [ "$GET_STS" = "$STS_ACTIVE"   -o "$GET_STS" = "$STS_STARTING" -o \
       "$GET_STS" = "$STS_STOPPING" -o "$GET_STS" = "$STS_QUIESCE"  -o \
       "$GET_STS" = "$STS_OFFLINE"  -o "$GET_STS" = "$STS_CHGMODE"  -o \
       "$GET_STS" = "$STS_STOPWAIT" -o "$GET_STS" = "$STS_MAINTNCE" ]
  then
    $SU - $ADBMGR -c "$ECHO y|$ADBDIR/bin/adbstop --force"
    STOPRES=$?
    if [ $STOPRES -ne 0 -a $STOPRES -ne 4 ]
    then
      ADB_ID=`$SU - $ADBMGR -c "$PS x" | $GREP $ADBSRVD | $GREP -v $GREP | $AWK '{print $1}'`
      if [ "$ADB_ID" != "" ]
      then
        $SU - $ADBMGR -c "$KILL $ADB_ID"
      fi
    fi
  fi

  ;;
"-w" )
  # Plan stop operations of active system.
  # (when the monswap command is executed.)
  if [ "$GET_STS" = "$STS_ACTIVE"   -o "$GET_STS" = "$STS_STARTING" -o \
       "$GET_STS" = "$STS_STOPPING" -o "$GET_STS" = "$STS_QUIESCE"  -o \
       "$GET_STS" = "$STS_OFFLINE"  -o "$GET_STS" = "$STS_CHGMODE"  -o \
       "$GET_STS" = "$STS_STOPWAIT" -o "$GET_STS" = "$STS_MAINTNCE" ]
  then
    $SU - $ADBMGR -c "$ECHO y|$ADBDIR/bin/adbstop --force"
    STOPRES=$?
    if [ $STOPRES -ne 0 -a $STOPRES -ne 4 ]
    then
      ADB_ID=`$SU - $ADBMGR -c "$PS x" | $GREP $ADBSRVD | $GREP -v $GREP | $AWK '{print $1}'`
      if [ "$ADB_ID" != "" ]
      then
        $SU - $ADBMGR -c "$KILL $ADB_ID"
      fi
    fi
  fi

  ;;
"-c" )
  # Retry operations of active system.
  # (Before the act_command is resterted.)
  $SU - $ADBMGR -c "adbinfoget -l -o $ADBINFODIR"

  ;;
esac

# stop HADB
if [ "$GET_STS" = "$STS_STARTING" ]
then
  ADB_ID=`$SU - $ADBMGR -c "$PS x" | $GREP $ADBSRVD | $GREP -v $GREP | $AWK '{print $1}'`
  $SU - $ADBMGR -c "$KILL $ADB_ID"
  
  exit 0
fi

# Wait for end of HADB
while [ "$GET_STS" = "$STS_ACTIVE"   -o "$GET_STS" = "$STS_STARTING" -o \
        "$GET_STS" = "$STS_STOPPING" -o "$GET_STS" = "$STS_QUIESCE"  -o \
        "$GET_STS" = "$STS_OFFLINE"  -o "$GET_STS" = "$STS_CHGMODE"  -o \
        "$GET_STS" = "$STS_STOPWAIT" -o "$GET_STS" = "$STS_COREDUMP" -o \
        "$GET_STS" = "$STS_MAINTNCE" ]
do
  GET_STS=`$SU - $ADBMGR -c "$ADBDIR/bin/adbls -d srv 2>/dev/null" | $GREP -v SVID | $AWK '{ if ($1 ~ /[0-9]+/) { print $2 } else { print $1 } }'`
  sleep 1
done

exit 0

Explanation

  1. For the source statement, specify the absolute path for the file for environment variable definitions for commands (/HADB/scripts/coldstandby.env).

(f) Specification example of the server-monitoring command file

In this example, the server-monitoring command is stored in /HADB/scripts/coldstandby_patrol.sh. Specify the same settings for the active system and the standby system.

■ Specification example of the server-monitoring command file
#!/bin/sh

# Sample of the patrolcommand for HADB

AWK=/bin/awk
GREP=/bin/grep
PS=/bin/ps
PGREP=/usr/bin/pgrep
PKILL=/usr/bin/pkill
SU=/bin/su
READLINK=/bin/readlink

# Setting environment variables for HADB
source /HADB/scripts/coldstandby.env       ...1

# Resolve the path for adbsrvd
ADBSRVD=`$READLINK -e $ADBDIR/bin/adbsrvd`
if [ $? -ne 0 ]
then
  exit 0
fi

# Get adbsrvd process id
CHKPID=`$SU - $ADBMGR -c "$PS x" | $GREP $ADBSRVD | $GREP -v $GREP | $AWK '{print $1}'`
if [ "$CHKPID" = "" ]
then
  exit 0
fi

# Execute adbmonitor command for active system
$SU - $ADBMGR -c "$ADBDIR/bin/adbmonitor -n" &
PID=$!

# Trap SIGTERM and terminate adbmonitor
trap "$PKILL -P $PID" 15

## Wait process terminated
CPID=""
CHKPID=`$PS aux | $AWK -v PID=$PID '{ if ($2 == PID) { print $2 } }'`
while [ "$CHKPID" != "" ]
do

  ## Get adbmonitor process id
  if [ "$CPID" = "" ]
  then
    CPID=`$PGREP -P $PID`
  fi
  
  ## Wait
  if [ "$CPID" != "" ]
  then
    CHKCPID=`$PS aux | $AWK -v CPID=$CPID '{ if ($2 == CPID) { print $2 } }'`
    while [ "$CHKCPID" != "" ]
    do
      sleep 1
      CHKCPID=`$PS aux | $AWK -v CPID=$CPID '{ if ($2 == CPID) { print $2 } }'`
    done
  fi
  
  sleep 1
  CHKPID=`$PS aux | $AWK -v PID=$PID '{ if ($2 == PID) { print $2 } }'`
done

exit 0

Explanation

  1. For the source statement, specify the absolute path for the file for environment variable definitions for commands (/HADB/scripts/coldstandby.env).

(6) File specification examples (when using SCSI reservation for shared disk)

This subsection provides specification examples for the following files. The following are specification examples when you are using SCSI reservation for shared disk.

The specification examples explained here assume the system configuration shown in Figure 17‒1: Example of a system configuration using the cold standby configuration.

(a) sysdef file specification examples

■ Specification example of the sysdef file for server machine hadb01 (active system)
environment  name hadb01,
             address 1,                 ...1
             patrol 60,
             lan path11,                ...2
             lanport HAmon1;            ...3
function     pathpatrol 240,
             connect_retry 5:200,
             monbegin_restart nouse,
             termcmd_at_abort nouse,
             fence_reset nouse,         ...4
             fence_scsi use,            ...5
             fence_lan nouse;

Explanation

  1. Specifies the order of priority for resetting hosts. Because this host is the active system, its reset priority needs to be the highest, so 1 is specified.

  2. Specify the host name of the LAN that is used for HA Monitor's monitoring path. Specify host name path11, which corresponds to IP address 172.16.0.11.

  3. Specify the service name of the LAN that is used for HA Monitor's monitoring path. Specify service name HAmon1, which corresponds to port number 7777.

  4. Because host reset will not be used, specify nouse.

  5. Because SCSI reservation for shared disk will be used, specify use.

■ Specification example of the sysdef file for server machine hadb02 (standby system)
environment  name hadb02,
             address 2,                 ...1
             patrol 60,
             lan path21,                ...2
             lanport HAmon1;            ...3
function     pathpatrol 240,
             connect_retry 5:200,
             monbegin_restart nouse,
             termcmd_at_abort nouse,
             fence_reset nouse,         ...4
             fence_scsi use,            ...5
             fence_lan nouse;

Explanation

  1. Specifies the order of priority for resetting hosts. This host is the standby system, so specify 2.

  2. Specify the host name of the LAN that is used for HA Monitor's monitoring path. Specify host name path21, which corresponds to IP address 172.16.0.12.

  3. Specify the service name of the LAN that is used for HA Monitor's monitoring path. Specify service name HAmon1, which corresponds to port number 7777.

  4. Because host reset will not be used, specify nouse.

  5. Because SCSI reservation for shared disk will be used, specify use.

(b) servers file specification examples

The following describes specification examples of a servers file in the following cases:

  • The shared disk is in a single-path configuration

  • A redundant configuration is used with multipath software (DMMP).

The examples described here assume that you are using ext4 as the file system. If you are using a file system other than ext4, the OS mount command options will differ from those in the examples shown here.

■ Specification example of the servers file in a single-path configuration

▪ Specification example of the servers file for server machine hadb01 (active system)

server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,                                          ...9
       fs_neck use:nouse:nouse:use,                                          ...10
       scsi_device /dev/disk/by-id/wwn-0x60060e8010205850051104c500000005:   ...11
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000006:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000007:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000008:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000f:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000e:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000010:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000011:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000013:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000d,
       initial online;                                                       ...12

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify the absolute paths for the disks that contain file systems subject to host switchover processing and the absolute paths for the disks that contain the DB areas. Specify the absolute paths in the same order for the active system and the standby system.

  12. Specify online to make this system the active system.

▪ Specification example of the servers file for server machine hadb02 (standby system)

server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,                                          ...9
       fs_neck use:nouse:nouse:use,                                          ...10
       scsi_device /dev/disk/by-id/wwn-0x60060e8010205850051104c500000005:   ...11
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000006:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000007:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000008:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000f:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000e:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000010:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000011:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c500000013:
                   /dev/disk/by-id/wwn-0x60060e8010205850051104c50000000d,
       initial standby;                                                      ...12

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify the absolute paths for the disks that contain file systems subject to host switchover processing and the absolute paths for the disks that contain the DB areas. Specify the absolute paths in the same order for the active system and the standby system.

  12. Specify standby to make this system the standby system.

■ Specification example of the servers file in a redundant configuration using multipath software (DMMP)

▪ Specification example of the servers file for server machine hadb01 (active system)

server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,       ...9
       fs_neck use:nouse:nouse:use,       ...10
       dmmp_device /dev/mapper/mpath1:    ...11
                   /dev/mapper/mpath2:
                   /dev/mapper/mpath3:
                   /dev/mapper/mpath4:
                   /dev/mapper/mpath11:
                   /dev/mapper/mpath12:
                   /dev/mapper/mpath13:
                   /dev/mapper/mpath14:
                   /dev/mapper/mpath15:
                   /dev/mapper/mpath16,
       initial online;                    ...12

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify the absolute paths for the disks that contain file systems subject to host switchover processing and the absolute paths for the disks that contain the DB areas. Specify the absolute paths in the same order for the active system and the standby system.

  12. Specify online to make this system the active system.

▪ Specification example of the servers file for server machine hadb02 (standby system)

server name  /HADB/server,                     ...1
       alias HADB,
       acttype monitor,
       disk /dev/vg_hadb01:                    ...2
            /dev/vg_hadb02:
            /dev/vg_hadb03:
            /dev/vg_hadb04,
       lan_updown use,
       fs_name /dev/vg_hadb01/hadb_db:         ...3
               /dev/vg_hadb02/hadb_workarea:
               /dev/vg_hadb03/hadb_syndict:
               /dev/vg_hadb04/hadb_audit,
       fs_mount_dir /HADB/db:                  ...4
                    /mnt/workarea:
                    /mnt/syndict:
                    /mnt/audit,
       fs_mount_opt "-t ext4 -o defaults,noatime,_netdev":    ...5
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev":
                    "-t ext4 -o defaults,noatime,_netdev",
       actcommand "/HADB/scripts/coldstandby_act.sh",         ...6
       termcommand "/HADB/scripts/coldstandby_term.sh",       ...7
       patrolcommand "/HADB/scripts/coldstandby_patrol.sh",   ...8
       servexec_retry 2,
       waitserv_exec yes,
       ip_neck use,
       uoc_neck nouse,
       vg_neck use:nouse:nouse:use,       ...9
       fs_neck use:nouse:nouse:use,       ...10
       dmmp_device /dev/mapper/mpath1:    ...11
                   /dev/mapper/mpath2:
                   /dev/mapper/mpath3:
                   /dev/mapper/mpath4:
                   /dev/mapper/mpath11:
                   /dev/mapper/mpath12:
                   /dev/mapper/mpath13:
                   /dev/mapper/mpath14:
                   /dev/mapper/mpath15:
                   /dev/mapper/mpath16,
       initial standby;                   ...12

Explanation

  1. Specify the absolute path for the server directory.

  2. Specify the absolute paths of the VGs that contain the file systems in which the following directories will be created:

    • DB directory

    • Directory that stores temporary work files

    • The directory storing synonym dictionary files (a directory created in order to perform synonym searches)

    • Audit trail directory (this directory is created in order to use the audit trail facility)

  3. Specify the absolute paths of the LVs where the file systems are set up that will store the directories in 2.

  4. Specify the absolute paths for the mount points at which to mount the file systems for the directories in 2.

  5. Specify options for the mount command to be used for mounting the file systems for the directories in 2.

  6. Specify the absolute path for the server startup command to be used in the cold standby configuration.

  7. Specify the absolute path for the server termination command to be used in the cold standby configuration.

  8. Specify the absolute path for the server-monitoring command to be used in the cold standby configuration.

  9. Specify as follows:

    • Specify use for the VG that contains the file system where the DB directory will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the VG that contains the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the VG that contains the file system where the audit trail directory will be created.

  10. Specify as follows:

    • Specify use for the file system where the DB directory will be created.

    • Specify nouse for the file system where the directory that stores temporary work files will be created.

    • Specify nouse for the file system where the directory that stores synonym dictionary files will be created.

    • Specify use for the file system where the audit trail directory will be created.

  11. Specify the absolute paths for the disks that contain file systems subject to host switchover processing and the absolute paths for the disks that contain the DB areas. Specify the absolute paths in the same order for the active system and the standby system.

  12. Specify standby to make this system the standby system.

(c) Specification example of a file for environment variable definitions for commands

For a specification example of a file for environment variable definitions for commands, see (c) Specification example of a file for environment variable definitions for commands in (5) File specification examples (when using host reset).

(d) Specification example of the server startup command file

For a specification example of the server startup command file, see (d) Specification example of the server startup command file in (5) File specification examples (when using host reset).

(e) Specification example of the server termination command file

For a specification example of the server stop command file, see (e) Specification example of the server termination command file in (5) File specification examples (when using host reset).

(f) Specification example of the server-monitoring command file

For a specification example of the server-monitoring command file, see (f) Specification example of the server-monitoring command file in (5) File specification examples (when using host reset).

(7) HA Monitor startup setting

Set up HA Monitor to start automatically when the operating system starts. For details about how to configure this setting, see Automating the operation from system start through server start in the manual HA Monitor for Linux(R) (x86).