Veritas-bu

[Veritas-bu] Auto Ejecting from an STK9310 using ACSLS

2002-09-24 12:24:40
Subject: [Veritas-bu] Auto Ejecting from an STK9310 using ACSLS
From: david AT datastaff DOT com (David A. Chapa)
Date: Tue, 24 Sep 2002 12:24:40 -0400
Ah, good thing to know re;the vmchange and acs.

Here's a sample of something you "might" do.  (This script was called by 
another script so some of the variables aren't set but you get the idea.)

---BEGIN---
#!/bin/ksh
#
#
#
CMDPROC=/export/home/ACSSS/bin/cmd_proc
ACS_SERVER=ACS_SERVER
CAP_TO_USE="0,0,0"
#
VOLNAME=$1
ACSLOGON="rsh -l acsss $ACS_SERVER"
#
#       --Begin Main Script--
#
if [ $# -lt 1 ]
then
 echo "$ERRORTIME - ERROR: Missing arguments." >> $ERRORLOG
 echo "" >> $ERRORLOG
fi
#
#       --Ensure Cap is Online--
#
STATUS=`echo $CAP_TO_USE | $ACSLOGON $CMDPROC -l -q 2> /dev/null | grep "0, 
0,0" | awk '{print $7}'`

if [ "$STATUS" != "available" ]
 then
  echo "$ERRORTIME - ERROR: CAP is not AVAILABLE right now." >> $ERRORLOG
  echo "$ERRORTIME - ERROR: $VOLNAME can not be ejected automatically." >> 
$ERRORLOG
  echo "$ERRORTIME - ERROR: Must eject $VOLNAME manually via the ACS/LS 
console." >> $ERRORLOG
  echo "" >> $ERRORLOG
  exit 2
fi
#
#       --Ejecting Volume--
#
echo "eject $CAP_TO_USE" | $ACSLOGON $CMDPROC -l -q | cat > /tmp/ck.eject
SUCCESS=`cat /tmp/ck.eject| grep "failed" | awk '{print $3}'`
if [ "$SUCCESS" = "failed," ]
then
 echo "$ERRORTIME - ERROR: EJECT FAILED for $VOLNAME" >> $ERRORLOG
 echo "" >> $ERRORLOG
 exit 2
fi
SUCCESS=`cat /tmp/ck.eject | grep "Eject: Eject complete" | awk '{print $3}'`
if [ "$SUCCESS" = "complete," ]
then
 echo "$ERRORTIME - INFO : EJECT COMPLETE for $VOLNAME" >> $ERRORLOG
 echo "" >> $ERRORLOG
 exit 0
else
 echo "$ERRORTIME - ERROR: EJECT can not complete for $VOLNAME" >> $ERRORLOG
 echo "" >> $ERRORLOG
 exit 1
fi
exit 0
----END----

Talk with Storage Tek to get access to their API, they might want something 
that is generally available for this purpose.  It would solve a lot of problems.


Quoting Scott Garrett <sgarrett-veritas-ug AT technomancer DOT com>:

> Quoting "David A. Chapa" <david AT datastaff DOT com>:
> 
> > Kelli: 
> > 
> > The only way you can do it with ACSLS today is to either write an app that
> 
> > talks to their API, or from a script on the NBU server use rsh. 
> 
> And what would you do when you rsh?  A pointer to some real information on
> the
> ACSLS system would help.  I have not been able to find any useful
> information,
> and have not been able to make the "eject" command in the acsss bin actually
> DO
> anything.
> 
> Or, where can I find API information.  I'm not opposed to writing a util
> either.
> 
> > Well, there's a third way too as I think about it...not my most favorite 
> > because it does take a tad bit longer in my opinion. 
> > 
> > vmchange -res -m $id -mt $DENSITY -rt none -e -sec 1 
> 
> Doesn't work with the acs at all:
> 
> # vmchange -res -m BBB482 -mt hcart -rt none -e -sec 1 
> Could not change media ID BBB482: cannot auto-eject this robot type (51)
> 
> > 
> > David Chapa
> > 
> > 
> > Quoting Kellibtaylor AT aol DOT com:
> > 
> > > Looking for clues on on how to "Auto- Eject"  on a STK9310 running
> > Netbackup
> > > 3.4. We  do our tape administration on this library manually via the
> ACSLS
> > 
> > > (version 5.3.2). We have not been able to find a way to facilitate this
> > using
> > > the ACSLS and would like to automate.   Any suggestions.  Thanx in
> > advance.
> 
> 
> -- 
>         Scott Garrett     mailto:sgarrett AT technomancer DOT com
>                                           http://www.technomancer.com
> 
>     *** No matter what you do, you'll never outsmart the squirrels.
>