[Veritas-bu] Help me, Obi-Wan. You are our only hope.
2003-05-14 11:53:07
Depending on what you want, 90% of vault is something you can write
yourself. The exception is the pretty GUI and inline tape copy (included in
base-level v5.0, though!).
Here's my eject_pool script. You inspired me to allow robot numbers to be
supplied so I just added the logic in response to your email.
Usage is: eject_pool [-l robnum] poolname
It's got a lot of extra logic to verify the poolname & such since it was
made with operators in mind.
The eject_tapes script, called at the end of this to actually move the tapes
out, is very complex in my environment because I allow eject requests to
queue if there's no available mailslots - you probably have an eject script
already but if you don't let me know & I'll post that.
Just call me Hercules...
-M
#!/bin/ksh
TMP=/tmp/`basename $0`.$$
export PATH=$PATH:/usr/openv/volmgr/bin:/usr/openv/local
if [ -z "$1" ]
then
echo "Usage: `basename $0` [-l robnum] poolname"
else
#Cmd-line processing
robnum=""
if [ "$1" = "-l" ]
then
#robot number supplied
shift
robnum=$1
shift
fi
poolname=$1
/usr/openv/volmgr/bin/vmpool -listall -b|awk 'NR>2 {print $1}' >$TMP
trap 'echo "Cleanup";[ -f $TMP ] && rm $TMP;exit' 1 2 3 4 15
if [ `grep -c "^${poolname}$" $TMP` -ne 1 ]
then
echo "## Poolname incorrect. Please choose from the list:"
sort $TMP
else
echo "## Checking pool count"
if [ -z "$robnum" ]
then
vmquery -w -a|awk '$8!="-" && $12=="'$poolname'" {print $1}'>$TMP
else
vmquery -w -a|awk '$8=="'$robnum'" && $12=="'$poolname'" {print
$1}'>$TMP
fi
pool_count=`wc -l $TMP | awk '{print $1}'`
if [ $pool_count -eq 0 ]
then
if [ -z "$robnum" ]
then
echo "## There are no robotic tapes in \"$poolname\" to eject."
else
echo "## There are no tapes in robot $robnum in \"$poolname\" to
eject."
fi
else
echo "## There are $pool_count robotic tapes in tape pool
\"$poolname\"."
#Good to go - sort, cut the CR's, & eject them
eject_tapes `sort -n $TMP | tr '\012' ' '`
fi
fi
fi
[ -f $TMP ] && rm $TMP
exit
-----Original Message-----
From: James Wood [mailto:jwood AT apa.qwest DOT net]
Sent: Tuesday, May 13, 2003 7:18 PM
To: Veritas
Subject: Re: [Veritas-bu] Help me, Obi-Wan. You are our only hope.
Heh, that is the answer I get to MANY of my queries. I am putting pressure
on the suits and beancounters for it, but things move slowly here.
Productivity efficiency is the key to winning this fight, but I also don't
want to script myself out of a job.....
;-)
----- Original Message -----
From: "Rockey Reed" <Rockey.Reed AT veritas DOT com>
To: "'James Wood'" <jwood AT apa.qwest DOT net>
Sent: Tuesday, May 13, 2003 6:51 PM
Subject: RE: [Veritas-bu] Help me, Obi-Wan. You are our only hope.
> James,
>
> Not a sales pitch, I make nothing off of sales, but you really ought to
get
> the VAULT extension. It does all you're looking for, is supported, and
> provides reports, shipping documents, and Email notification.
>
> Thanks,
> Rockey Reed
> MCSE, MCP+I
> Staff Consultant
> VERITAS Software
>
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Veritas-bu] Help me, Obi-Wan. You are our only hope., James Wood
- [Veritas-bu] Help me, Obi-Wan. You are our only hope., James Wood
- [Veritas-bu] Help me, Obi-Wan. You are our only hope., Nash, Ebon
- [Veritas-bu] Help me, Obi-Wan. You are our only hope., Friedline, Harold
- [Veritas-bu] Help me, Obi-Wan. You are our only hope.,
Donaldson, Mark <=
|
|
|