Operating System - HP-UX
1837979 Members
2957 Online
110124 Solutions
New Discussion

Managing Active/Passive Cluster.

 
Amit Dixit_2
Regular Advisor

Managing Active/Passive Cluster.

Hi,
We are having active passive cluster
environment and we are running webMethods on
it.
The problem we are having is whenever we do
any changes we need to do a failover and then
do the same task on the passive one as well.

Can anybody help how to make this thing
automatic so that we deploy any package/fixes
on webmethods and should get replicated on
the passive one.

Thanks,
Amit.


6 REPLIES 6
Stanimir
Trusted Contributor

Re: Managing Active/Passive Cluster.


Hi!

If you mean HA cluster, there are not direct way to simultaneous changes. If you change something in the staff of package,this change could be moved togather with the package on the passive node. So try this. Another solution is to try to
create small client-server system between 2 nodes,which be responsible to carry any changes between it. But it is more sophisticated solution.

Regards.


Paul Torp
Regular Advisor

Re: Managing Active/Passive Cluster.

this script fixes the vg and lv changes
-paul

#!/bin/sh
#
# Export volum group and logical volum from primary maskin to secondary maskin
# This must be done after making any change to volum group in cluster on either
machine

if [ $# -lt 2 ]
then
echo "Usage: $0 "
exit 1
fi

PRI_HOST=`hostname`

# ==================================================
# Check the volume group on the primary machine
# ==================================================
VOLGRP=$1
vgdisplay $VOLGRP > /dev/null
status=$?
if [ $status -ne 0 ]
then
echo "The volum group does not exist..."
exit 1
else
GRPID=`ll $VOLGRP/group | awk '{print $6}'`

# Zero length
if [ -z "$GRPID" ]
then
echo "Make sure that the fullpath of volume group is given."
exit 1
fi
VOLNAME=`echo $VOLGRP | cut -d"/" -f3`
echo "GroupID for $VOLGRP is $GRPID"
fi

# ==================================================
# Check the accessibility to secondary machine
# ==================================================
SEC_HOST=$2
#grep $SEC_HOST /etc/hosts > /dev/null
status1=0
grep $SEC_HOST $HOME/.rhosts > /dev/null
status2=$?
if [ $status1 -ne 0 -o $status2 -ne 0 ]
then
echo "Cannot remote access the secondary machine $SEC_HOST..."
exit 1
fi

# ==================================================
# Begin to export the volume group on Primary machine
# ==================================================
TMPGRP=${PRI_HOST}_${VOLNAME}
EXPSTR="vgexport -p -s -v -m /tmp/$TMPGRP.map $VOLGRP"
echo "execute '$EXPSTR' [y/n?]\c "
read svar
case $svar in
["y|Y"]) $EXPSTR;;
["n|N"]) echo "End of wizard...Nothing done."; exit 1;;
* ) echo "Please enter y|Y or n|N. End of wizard"; exit 1;;
esac
rcp /tmp/$TMPGRP.map $SEC_HOST:/tmp
tar cvf /tmp/${TMPGRP}_lv.tar $VOLGRP/*
rcp /tmp/${TMPGRP}_lv.tar $SEC_HOST:/tmp


# ==================================================
# Now run remsh on the secondary machine
# ==================================================
echo "Importing volume group ${VOLGRP} to Secondary machine $SEC_HOST, please wa
it..."
remsh $SEC_HOST "(umask 022; /usr/sbin/vgexport ${VOLGRP})"
remsh $SEC_HOST "(umask 022; /usr/bin/mkdir ${VOLGRP})"
remsh $SEC_HOST "(umask 022; /usr/sbin/mknod ${VOLGRP}/group c 64 ${GRPID})"
remsh $SEC_HOST "(umask 022; /usr/sbin/vgimport -s -v -m /tmp/$TMPGRP.map ${VOLG
RP})"
remsh $SEC_HOST "(umask 022; /usr/bin/rm ${VOLGRP}/*l*)"
remsh $SEC_HOST "(umask 022; /usr/bin/tar xpvf /tmp/${TMPGRP}_lv.tar)"

"sendmail is kind of fun..."
Paul Torp
Regular Advisor

Re: Managing Active/Passive Cluster.

i forgot.. the syntax:

Run on the node where the changes are being made in a 2 node cluster.

./exp_imp_vol.sh /dev/vg_whatever 2ndHostname
"sendmail is kind of fun..."
Paul Torp
Regular Advisor

Re: Managing Active/Passive Cluster.

for the cntl and conf files and any other files.

cd /etc/cmcluster/packagename
rcp * 2ndHostname:$PWD
"sendmail is kind of fun..."
Amit Dixit_2
Regular Advisor

Re: Managing Active/Passive Cluster.

Hi,
What if I just copy the entire folder of
java packages from active to passive
cluster will it work ??

Anyone having any other IDEA please let me
know.

Thanks,
Amit.
Sanjay_6
Honored Contributor

Re: Managing Active/Passive Cluster.

Hi amit,

The best solution in this king of situation is to failover all the filesystems associated with the package from one node to another. That way, all the binaries are transferred from onehost to another. The only think left to be synced up is the package control and startup / shutdown scripts which are under /etc/cmcluster and must reside on both the nodes. So do rcp/scp from one node to another whenever a change is made to the cluster control, startup / shutdown scripts.

Hope this helps.

Regds