Fail Over cluster script for Suse 11

patelp

ADSM.ORG Member
Joined
Nov 9, 2006
Messages
113
Reaction score
2
Points
0
Website
http
I have 4 node SUSE 11. My Linux admin created 11 resource. We migrated all Novell drives to 11 Shares. I have created dsm.sys file for each physical server. I mean stanza. I copied dsm.sys on all 4 node. I have setup the scheduler to run backup. I am using manually command now export DSM_Config=/media/nss/XXXXXXX/Tivoli/dsm.opt for each resource. Then I used dsmcad to load schedule. When the cluster fails over to another node, I can put two lines in startup script.

export DSM_Config=/media/nss/xxxxx/Tivoli/dsm.opt
dsmcad

When cluster fails over and script is running file and schedule start but, How can i kill dsmcad process was associated on another node rather than guessing. Some time, It may running more than one resource on same node.

By the way, This is my first TSM Cluster install for linux. I know how to do in windows.

Thanks,
ParulView attachment 642
 

Attachments

  • dsm.txt
    4.5 KB · Views: 6
Hi,

the easiest way (although not very pretty) is to copy the dsmcad executable for each cluster resource as "dsmcad_resourceX" - then you run/kill this very copied executable.

Harry

UPDATE:
to prevent running multiple instances of the same CAD I have created (years ago) this script - it is not perfect (I can see it clearly now :) ) but did its job at the time - may give few pointers
Code:
/opt/tivoli/tsm/client/ba/bin/dsmcad_data.rc

#!/bin/bash
DAEMON=/opt/tivoli/tsm/client/ba/bin/dsmcad_RESX
PIDFILE=/var/run/dsmcad_RESX.pid

if [ -e $PIDFILE ]
  then
        echo "PID file found, trying to kill the instance if running ..."
        PID=`cat $PIDFILE`
        echo PID is $PID
        STATUS=`ps aux| grep $PID | grep dsmcad | wc -l`
        echo STATUS is $STATUS
        if [ $STATUS == 0 ]
                then
                        echo No DSMCAD running under this PID
                else
                        echo Something is running
                        ps aux| grep $PID | grep dsmcad
                        echo Trying to kill it ...
                        kill -9 $PID
                        sleep 2
                        echo Is it dead?
                        ps aux| grep $PID | grep dsmcad
                        rm $PIDFILE
        fi
fi

DSM_DIR=/opt/tivoli/tsm/client/ba/bin
DSM_CONFIG=/opt/tivoli/tsm/client/ba/bin/RESX.opt
DSM_LOG=/opt/tivoli/tsm/client/ba/bin
LC_CTYPE=en_US
LANG=en_US
LC_ALL=en_US
export DSM_DIR DSM_CONFIG DSM_LOG
export LC_CTYPE LANG LC_ALL
$DAEMON
NEWPID=$(pidof $DAEMON)
echo $NEWPID > $PIDFILE
 
Last edited:
Back
Top