Veritas-bu

Re: [Veritas-bu] quick eject script

2009-12-03 13:12:47
Subject: Re: [Veritas-bu] quick eject script
From: "Donaldson, Mark" <Mark.Donaldson AT Staples DOT com>
To: "Reynolds, Susan K." <SReynolds2 AT semprautilities DOT com>, <Veritas-bu AT mailman.eng.auburn DOT edu>
Date: Thu, 3 Dec 2009 11:10:47 -0700

Could be..  Both of mine are config'd as TLD.

 

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: Wednesday, December 02, 2009 2:57 PM
To: Donaldson, Mark; Veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] quick eject script

 

Maybe TLH library thing?

 

Here is a tape in a drive:

 

sudo ./vmquery -m s06571

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

media ID:              S06571

media type:            1/2" cartridge tape 2 (14)

barcode:               S06571

media description:     Robot 0 RB Tapes - HCART2

volume pool:           Exchange_Onsite (15)

robot type:            TLH - Tape Library Half-inch (12)

robot number:          0

robot slot:            0

robot control host:    bs-nbma1

volume group:          01_000_TLH

vault name:            ---

vault sent date:       ---

vault return date:     ---

vault slot:            ---

vault session id:      ---

vault container id:    -

created:               Fri Apr 25 14:16:03 PDT 2008

assigned:              Wed Dec  2 12:40:44 PST 2009

last mounted:          Wed Dec  2 12:50:04 PST 2009

first mount:           Fri May  9 06:04:48 PDT 2008

expiration date:       ---

number of mounts:      22

max mounts allowed:    ---

status:                0x0

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

 

Just trying to figure out some script logic. I want the report to ignore tapes that are in a drive for a particular purpose we have.

 

 

From: Donaldson, Mark [mailto:Mark.Donaldson AT Staples DOT com]
Sent: Wednesday, December 02, 2009 8:57 AM
To: Reynolds, Susan K.; Veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] quick eject script

 

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:SReynolds2 AT semprautilities DOT com]
Sent: Tuesday, December 01, 2009 4:58 PM
To: Donaldson, Mark; Veritas-bu AT mailman.eng.auburn DOT 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.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.

_______________________________________________
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>