If slot=0 then it is in a drive; I did a vmquery on a tape that
was in a drive and that’s what came back
From: Donaldson, Mark [mailto:Mark.Donaldson AT Staples DOT com]
Sent: Tuesday, December 01, 2009 3:55 PM
To: Reynolds, Susan K.; Veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] quick eject script
I think your second step is
in error - a tape in a drive doesn't update the vmquery slot number.
I'd do something like this…
for tape in `vmquery -rn 0 -l
| awk '$11~/Offsite/ {print $1}`
do
eject routine (lots of
lines)
done
I actually do something much
like this for offsite purposes. My eject_tapes script is 60 lines of code
that looks up the library for a tape given the tape number. If the tape
is in a drive, though, it just errors . I supposed I could query the library
controls for the tape location (see if it's in a drive) but right now I just
eat the error when it occurs.
-M
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Reynolds,
Susan K.
Sent: Tuesday, December 01, 2009 3:22 PM
To: Veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] quick eject script
Does anyone have a quick
eject script the logic of which goes something like this:
1. Eject
any tapes in the OFFSITE volume pool if it is in the tape library
2. Ignore
tapes in a drive (vmquery slot number =0)
3. And
email the list of tapes to me with a report title and today’s date
Is there anything quick and
easy out there like that?
Appreciate your help.