пятница, 14 февраля 2014 г.

System Director 6.3 in Cluster Environment IBM System Mirror 7.1.3


think, today you as i, wanted  to put ur System Director into  fresh cluster.

some easy preparation steps:

0. Install ISDirector on first node

1. propagate between nodes this directories:
/etc/ibm/director/*
          /etc/tivoli/cce/*
and file:
          /etc/rc.d/init.d/smserver
   

check the file  /etc/tivoli/cce/*/cce.ini   for CCE_Config_HomeDirectory var that should be point to  /opt/ibm/director/data/tivoli/cce/*/config
   
2. all nodes must have this users:
dirinst1:!:232:101:IBM Systems Director Database User:/home/dirinst1:/usr/bin/ksh
and groups:
db2iadm1:!:101:dirinst1
smadmin:!:205:root
smmon:!:206:
smmgr:!:207:
smuser:!:208:

3. Check db2 autostart with command:
/opt/ibm/director/db2/instance/db2iauto -on dirinst1
4. Define LIBPATH in the Systems Director startup script /etc/rc.d/init.d/smserver, like this:
# For Systems Director server during system startup
LIBPATH=/home/dirinst1/sqllib/lib64/:$LIBPATH
export LIBPATH

5. add all cluster nodes to file /home/dirinst1/sqllib/db2nodes.cfg
0 sysdir01 0
1 sysdir02 0
===>> AND FAIL!! after this step i cant run db2 << need fix this issue

sync between nodes file /etc/services or add on every node this lines to /etc/services :
DB2_dirinst1    60010/tcp
DB2_dirinst1_1  60011/tcp
DB2_dirinst1_2  60012/tcp
DB2_dirinst1_END        60013/tcp
db2c_dirinst1   50010/tcp

6. Cluster START and STOP scripts:

START:
#!/usr/bin/bash -x
#hello, ima start scipt for IBM System Director 6 in Cluster environment
#exit 0
log=/tmp/ha.log
hn=`/usr/bin/hostname`

date | tee -a $log

#cat /home/dirinst1/sqllib/db2nodes.cfg
#0 sysdir01 0

echo $hn | tee -a $log

echo "0 sysdir01 0" > /home/dirinst1/sqllib/db2nodes.cfg

if [ $hn == "sysdir02" ] ; then
        echo "0 sysdir02 0" > /home/dirinst1/sqllib/db2nodes.cfg;
fi
          su - dirinst1 -c "db2start" | tee -a $log
          su - dirinst1 -c "db2 activate database DIRDB" | tee -a $log
/opt/ibm/director/bin/smstart

SMSTAT=`/opt/ibm/director/bin/smstatus`
echo System director is $SMSTAT >> $log
#Inactive


while [ "$SMSTAT" != "Active" ]; do

        date | tee -a  $log
        SMSTAT=`/opt/ibm/director/bin/smstatus`
        echo System director is $SMSTAT | tee -a $log
        su - dirinst1 -c "db2 list active databases" | tee -a $log
        su - dirinst1 -c "db2 list applications" | tee -a  $log
        sleep 10

done

su - dirinst1 -c "db2 list active databases"  | tee -a $log

#su - dirinst1 -c "db2start"  >> $log
#su - dirinst1 -c "db2 activate database DIRDB"  >> $log

STOP:
#!/usr/bin/bash -x
#hello, ima stop scipt for IBM System Director 6 in Cluster environment
#exit 0

log=/tmp/ha.log
date | tee -a  $log
/opt/ibm/director/bin/smstop

SMSTAT=`/opt/ibm/director/bin/smstatus`
echo System director is $SMSTAT >> $log
#Inactive
su - dirinst1 -c "db2 list active databases" | tee -a $log
su - dirinst1 -c "db2 list applications" | tee -a  $log
su - dirinst1 -c "db2 terminate" | tee -a  $log
su - dirinst1 -c "db2 deactivate database DIRDB" | tee -a $log
su - dirinst1 -c "db2stop" | tee -a $log

IPCSJUNK=`/usr/bin/ipcs | grep -i dirinst1 | awk '{print $2}' | xargs`
for i in $IPCSJUNK;do
        echo remove IPC $i | tee -a $log;
        /usr/bin/ipcrm  -q $i
done
ps -ef | grep -i db2 | tee -a $log
/usr/sbin/slibclean

OS AIX 7.1 of course

Комментариев нет: