Well - dunno why.  Certainly doesn't work that way for me.

 

> vmoprcmd -d ds | grep Yes

 26 hcart3   TLD               Yes   007766  007766   Yes     Yes
0  <<<<

 30 hcart3   TLD               Yes   007357  007357   Yes     Yes
0

 39 hcart3   TLD               Yes   007195  007195   Yes     Yes
0

 

> sudo vmquery -m 007766

========================================================================
========

media ID:              007766
<<<<<

media type:            1/2" cartridge tape 3 (24)

barcode:               007766L4

media description:     hcart3

volume pool:           Exchange (32)

robot type:            TLD - Tape Library DLT (8)

robot number:          1

robot slot:            114
<<<<<

robot control host:    uscobrmfa-ug-50

<snip>

========================================================================
========

 

From: Reynolds, Susan K. [mailto:sreynol...@semprautilities.com] 
Sent: Tuesday, December 01, 2009 4:58 PM
To: Donaldson, Mark; Veritas-bu@mailman.eng.auburn.edu
Subject: RE: [Veritas-bu] quick eject script

 

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.donald...@staples.com] 
Sent: Tuesday, December 01, 2009 3:55 PM
To: Reynolds, Susan K.; Veritas-bu@mailman.eng.auburn.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-boun...@mailman.eng.auburn.edu
[mailto:veritas-bu-boun...@mailman.eng.auburn.edu] On Behalf Of
Reynolds, Susan K.
Sent: Tuesday, December 01, 2009 3:22 PM
To: Veritas-bu@mailman.eng.auburn.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.

_______________________________________________
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

Reply via email to