1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Fail Over cluster script for Suse 11

Discussion in 'Backup / Archive Discussion' started by patelp, Mar 16, 2012.

  1. patelp

    patelp New Member

    Joined:
    Nov 9, 2006
    Messages:
    113
    Likes Received:
    2
    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,
    Parul View attachment 642
     

    Attached Files:

    • dsm.txt
      File size:
      4.5 KB
      Views:
      4
  2.  
  3. Harry_Redl

    Harry_Redl Moderator

    Joined:
    Dec 29, 2003
    Messages:
    2,259
    Likes Received:
    134
    Occupation:
    IT Consultant
    Location:
    Czech Republic
    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: Mar 16, 2012

Share This Page