Networker

Re: [Networker] change tape media with (R) designation

2009-10-01 13:10:48
Subject: Re: [Networker] change tape media with (R) designation
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 1 Oct 2009 12:04:03 -0500
In regard to: Re: [Networker] change tape media with (R) designation, David...:

On Thu, September 24, 2009 12:30, Tim Mooney wrote:

Yes, but it's likely not going to matter.  NetWorker *will* happily
recycle tapes that are marked as read-only.  What it won't do is recycle
tapes that are marked as "manual".

You can try using

        nsrmm -o notreadonly VOLUMENAME

but I don't think that's going to be the magic bullet to get NetWorker to
start using these.

This makes them read-write, but the recyclable flag is then lost.

Ok, so you now need two steps:

        nsrmm -o notreadonly VOLUMENAME
        nsrmm -o recyclable VOLUMENAME

to answer the original question.

The
magic incantation seems to be 'nsrjb -LR <vol>':

   -L    Labels  the volumes in the specified slots, or for remotely man-
         aged jukeboxes,  by  specified  tags. [...]

   -R    Recycles  the  volume.  If  a  volume is recyclable, you are not
         prompted for confirmation as to whether or not this  volume  may
         be  overwritten. See nsrmm(1) for a discussion of the per-volume
         flags.

The '-Y' flag could also be useful. At the end of this operation the
volumes have a "appendable" state/flag and are usable in the pool they are
in.

That will indeed relabel volumes (and if you use -Y, even volumes that are
not recycleable, so be careful).  I would have to reread the original
question, but I tried to answer the question that was asked, which I think
was "how do you make tapes not readonly".

What I don't understand is: all the savesets that have expired, and have a
volume mode / state of 'expired', why is the 'read-only' flag being set?
Looking at the media list, everything that is expired is also read-only.
Is there a setting that I can enable to tell NetWorker to automatically
re-use tapes?

No.  NetWorker does that automatically.  There's no setting you need to
configure and in fact there's nothing you could change that would globally
disable it.

You can prevent NetWorker from recycling a volume on a volume-by-volume
basis by marking the volume as "manual".  As I said in my original
response, just marking it "read only" will NOT prevent NetWorker from
recycling it when it's eligible.

Every so often in the messages log I get a "media info: suggest relabeling
<volume> on <server> for writing  to pool '<pool>'". Sometimes I see NW
trying to relabel it eventually as well.

What version of NetWorker are you running?

Can NetWorker just choose the oldest tape that start overwriting it, or is
the manual relabeling thing done on purpose? Do I need to just setup a
cron job to do the relabeling?

NetWorker may not even choose the oldest tape.  I'm not certain what its
exact algorithm is, but it's not solely LRU.  NetWorker doesn't recycle
tapes until it needs one, so if you have a pool that has many more tapes
in it than you need, you could have recycleable tapes sitting in that pool
virtually forever.

For our pools that have certain types of data (e.g. email), we started
forcing NetWorker to recycle tapes as soon as they were eligible, for
exactly that reason.  We want a predictable expiry for that backup data,
which basically means telling NetWorker to recycle the tapes, whether it
needs to or not.

Tim
--
Tim Mooney                                             Tim.Mooney AT ndsu DOT 
edu
Enterprise Computing & Infrastructure                  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