Chapter 20. VERITAS Cluster Server on AIX with IBM Tivoli Storage Manager Client and ISC applications
20.5 Veritas Cluster Manager configuration
The installation process configured the core cluster services for us, now we need
to configure the Service Groups and their associated resources for the Tivoli
Storage Manager client and the ISC.
20.5.1 Preparing and placing application startup scripts
We will develop and test our start, stop, clean, and monitor scripts for all of our
applications, then place them in the /opt/local directory on each node, which is a
local filesystem within the rootvg.
Scripts for the client CAD
We placed the scripts for the server in the rootvg, /opt filesystem, in the directory
/opt/local/tsmcli.
1. The start script /opt/local/tsmcli/startTSMcli.sh is shown in Example 20-7.
Example 20-7 /opt/local/tsmcli/startTSMcli.sh
#!/bin/ksh
set -x
###############################################################################
# Tivoli Storage Manager *
# *
###############################################################################
#
# The start script is used in the following cases:
# 1. when HACMP is started and resource groups are "activated"
# 2. when a failover occurs and the resource group is started on another node
# 3. when fallback occurs (a failed node re-enters the cluster) and the
# resource group is transferred back to the node re-entering the cluster.
#
# Name: StartClusterTsmclient.sh
#
# Function: A sample shell script to start the client acceptor daemon (CAD)
# for the TSM Backup-Archive Client. The client system options file must be
# configured (using the MANAGEDSERVICES option) to allow the CAD to manage
# the client scheduler. HACMPDIR can be specified as an environment variable.
# The default HACMPDIR is /ha_mnt1/tsmshr
#
###############################################################################
if [[ $VERBOSE_LOGGING = "high" ]]
then
set -x
fi
858 IBM Tivoli Storage Manager in a Clustered Environment
#Set the name of this script.
myname=${0##*/}
#Set the hostname for the HADIR
hostname=`hostname`
# Set default HACMP DIRECTORY if environment variable not present
if [[ $HADIR = "" ]]
then
HADIR=/opt/IBM/ISC/tsm/client/ba/bin/$hostname
fi
PIDFILE=$HADIR/hacad.pids
#export DSM variables
export DSM_DIR=/usr/tivoli/tsm/client/ba/bin
export DSM_CONFIG=$HADIR/dsm.opt
#################################################
# Function definitions.
#################################################
function CLEAN_EXIT
{
#There should be only one process id in this file
#if more than one cad, then display error message
wc $HADIR/hacad.pids |awk '{print $2}' >$INP |
if [[ $INP > 1 ]]
then
msg_p1="WARNING: Unable to determine HACMP CAD"
else
msg_p1="HACMP CAD process successfully logged in the pidfile"
fi
print "$myname: Start script completed. $msg_p1"
exit 0
}
#Create a function to first start the cad and then capture the cad pid in a
file
START_CAD()
{
#Capture the process ids of all CAD processes on the system
ps -ae |grep dsmcad | awk '{print $1}' >$HADIR/hacad.pids1
Chapter 20. VERITAS Cluster Server on AIX with IBM Tivoli Storage Manager Client and ISC applications
#Start the client accepter daemon in the background
nohup $DSM_DIR/dsmcad &
#wait for 3 seconds for true cad daemon to start
sleep 3
#Capture the process ids of all CAD processes on the system
ps -ae |grep dsmcad | awk '{print $1}' >$HADIR/hacad.pids2
#Get the HACMP cad from the list of cads on the system
diff $HADIR/hacad.pids1 $HADIR/hacad.pids2 |grep ">" |awk '{print$2}'
>$PIDFILE
}
# Now invoke the above function to start the Client Accepter Daemon (CAD)
# to allow connections from the web client interface
START_CAD
#Display exit status
CLEAN_EXIT
exit
2. We then place the stop script in the directory as
/opt/local/tsmcli/stopTSMcli.sh, shown in Example 20-8.
Example 20-8 /opt/local/tsmcli/stopTSMcli.sh
#!/bin/ksh
###############################################################################
# Tivoli Storage Manager *
# *
###############################################################################
#
# The stop script is used in the following situations
# 1. When HACMP is stopped
# 2. When a failover occurs due to a failure of one component of the resource
# groups, the other members are stopped so that the entire group can be
# restarted on the target node in the failover
# 3. When a fallback occurs and the resource group is stopped on the node
# currently hosting it to allow transfer back to the node re-entering the
# cluster.
#
# Name: StopClusterTsmclient.sh
#
# Function: A sample shell script to stop the client acceptor daemon (CAD)
# and all other processes started by CAD for the TSM Backup-Archive Client.
860 IBM Tivoli Storage Manager in a Clustered Environment
# The client system options file must be configured (using the
# MANAGEDSERVICES option) to allow the CAD to manage the client scheduler.
# HADIR can be specified as an environment variable. The default HADIR is
# /ha_mnt1/tsmshr This variable must be customized.
#
###############################################################################
#!/bin/ksh
if [[ $VERBOSE_LOGGING = "high" ]]
then
set -x
fi
#Set the name of this script.
myname=${0##*/}
#Set the hostname for the HADIR
hostname=`hostname`
# Set default HACMP DIRECTORY if environment variable not present
if [[ $HADIR = "" ]]
then
HADIR=/opt/IBM/ISC/tsm/client/ba/bin/$hostname
fi
PIDFILE=$HADIR/hacad.pids
CPIDFILE=$HADIR/hacmp.cpids
#export DSM variables
export DSM_DIR=/usr/tivoli/tsm/client/ba/bin
export DSM_CONFIG=$HADIR/dsm.opt
#define some local variables
final_rc=0;
#################################################
# Function definitions.
#################################################
# Exit function
function CLEAN_EXIT
{
# Display final message
if (( $final_rc==0 ))
then
# remove pid file.
if [[ -a $PIDFILE ]]
then

Get IBM Tivoli Storage Manager in a Clustered Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.