Cost-Effective High-Availability Solutions with HP Instant Capacity on HP-UX
# status is not UP, run icapmanage -x on the Group Manager
echo OS on $OTHER_HOST is not up, running icapmanage -x on ap1 >&2
remsh ap1 -l root -n “/usr/sbin/icapmanage -x $OTHER_HOST”
fi
#Always activate 6 additional cores in order to run the package
echo Executing /usr/sbin/icapmodify -a 6 >&2
/usr/sbin/icapmodify -a 6
return 0
The gicap_stop.sh shutdown script is invoked from the customer_defined_halt_cmds
function of the package control script. It provides cleanup and is useful in making the processing of
the scripts generic because it can always simply deactivate the processor cores needed to run the
package. This script is only invoked when the package is stopped cleanly, for example during reboot,
or whenever the cmhaltpkg command is run. It is not run during a failure situation.
# cat gicap_stop.sh
#! /usr/bin/sh
# Package is shutting down, deactivate cores
echo Executing /usr/sbin/icapmodify -d 6 >&2
/usr/sbin/icapmodify -d 6
return 0
Scripts for Group Manager failover
These scripts pertain to the Group Manager failover portion of the “Example: Automated
(Serviceguard) partial outage member failover and Group Manager failover” sub-section.
For Group Manager failover from an active Group Manager ap1 to a standby Group Manager ap2,
the package definition specifies “yes” for auto_run and “manual” or “automatic” for
failback_policy. It also indicates that the package should always start on ap1 before ap2, if
possible. For package startup, a script to handle failover might look like the following:
# cat gm_start.sh
#! /usr/bin/sh
PATH=$PATH:/usr/sbin
HOSTNAME=`/usr/bin/hostname`
# Take control of the group when started
echo Taking control of the GiCAP Group on $HOSTNAME >&2
/usr/sbin/icapmanage -Q -n
return 0
42