Networker

Re: [Networker] How best to script re-labeling tapes ...

2007-09-28 14:33:37
Subject: Re: [Networker] How best to script re-labeling tapes ...
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 28 Sep 2007 13:26:28 -0500
In regard to: [Networker] How best to script re-labeling tapes ..., MIchael...:

I run NW 7.3.2jumbo on Win2003, with a HP SDLT320 tape library (48 slots,
4 drives). I'd like to write a script to re-label only certain tapes
(i.e., if a tape in any slot is in pool CLONE and the mode is RECYCLEABLE,
I want to re-label that tape, keeping it in the same pool. But not
re-label a tape in pool CLONE that is APPENDABLE).

I've searched, but don't seem to see a way to automate this, because I
would need to query NetWorker for the mode and pool of each tape in each
slot, so there would be no user interaction required. Can anyone provide
clues or pointers to how I might be able to accomplish this? (if it can be
done, that is)

It can be, and shouldn't be very hard.  Let's say your jukebox is named
HPJB.  Your query would look something like (on UNIX, not sure how you
do backticks on Windows)

for t in `mminfo -q location=HPJB,volrecycle,pool=CLONE -r volume`
do
        nsrjb -R "$t"
done


In your situation, you can likely replace "location=HPJB" with "near", but
that won't work in the general case if you have more than one jukebox.

Sorry I don't know the syntax for Windows.

Tim
--
Tim Mooney                                        Tim.Mooney AT ndsu DOT edu
Information Technology Services                   (701) 231-1076 (Voice)
Room 242-J6, IACC Building                        (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the body of the email. Please write to networker-request 
AT listserv.temple DOT edu if you have any problems with this list. You can access the 
archives at http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>