Re: [Networker] Recycle Multiple Volumes
2010-10-18 16:17:54
> mattman555
> I'd like to select a set of volumes and set their mode to recycle in
> a more efficient manner..
>
> I believe this could be accomplished by command line but I'm at a loss..
Check out mminfo and nsrmm. mminfo can tell list the volumes in date order
and nsrmm can mark them recyclable. For example:
Here's a full listing of all the non-recyclable volumes in "pool_name",
with extra fields as a sanity check. You'll probably want to use the
'savetime' parameter to limit the list, though (carefully read the mminfo
man page) -
# mminfo -ar 'volume,volaccess,pool' -q 'pool=pool_name,!volrecycle'
-ot
volume vl access pool
001752 10/10/10 pool_name
001749 10/12/10 pool_name
001711 10/13/10 pool_name
001777 10/14/10 pool_name
001769 10/16/10 pool_name
001745 10/17/10 pool_name
001746 10/18/10 pool_name
001771 10/18/10 pool_name
Here's just the volume names -
# mminfo -ar 'volume' -q 'pool=pool_name,!volrecycle' -ot
001752
001749
001711
001777
001769
001745
001746
001771
And here's how to mark one recyclable -
# nsrmm -o recyclable 001752
On unix, you can feed the output of mminfo into a loop and sequentially
mark each one like -
# mminfo command | while read vol
do
nsrmm -yo recyclable $vol
done
Just test your mminfo query thoroughly first. If you screw up, you'll be
scanning some tapes. :-)
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
|
|
|