Amanda-Users

RE: Next Tapes are Offsite

2006-08-08 16:05:11
Subject: RE: Next Tapes are Offsite
From: "McGraw, Robert P." <rmcgraw AT purdue DOT edu>
To: <amanda-users AT amanda DOT org>
Date: Tue, 8 Aug 2006 15:58:21 -0400

> -----Original Message-----
> From: owner-amanda-users AT amanda DOT org [mailto:owner-amanda-users AT 
> amanda DOT org]
> On Behalf Of Jon LaBadie
> Sent: Tuesday, August 08, 2006 2:32 PM
> To: amanda-users AT amanda DOT org
> Subject: Re: Next Tapes are Offsite
> 
> 
> On Tue, Aug 08, 2006 at 10:27:00AM -0500, Frank Smith wrote:
> > Jon LaBadie wrote:
> > > On Mon, Aug 07, 2006 at 02:37:17PM -0400, Ian Turner wrote:
> > >> Marilyn,
> > >>
> > >> Amanda's tape selection policy is as follows.
> > >>
> > >> Consider the set of tapes T. We can partition the set into two
> disjoint
> > >> subsets A (the set of active tapes) and I (the set of inactive
> tapes).
> > >> Assuming I is nonempty, there exists a subset P of I, called the set
> of
> > >> preferred tapes. Note that T = A + I, and P is a weak subset of I.
> > >>
> > >> Amanda will only use tapes from I; active tapes are not considered
> for
> > >> overwriting. Also, tapes from P are preferred to other tapes in I; a
> tape not
> > >> in P (but in I) will be used only if no tapes in P are available. If
> no tapes
> > >> from I are available, then no tapes are used and Amanda will go into
> degraded
> > >> mode.
> > >>
> > >> Tapes are assigned to each of the two sets as follows:
> > >> -- Any labeled but unused tapes are in I and P. This includes
> unlabeled tapes
> > >> if the label_new_tapes option is set.
> > >> -- The most recently used "tapecycle" number of tapes is in A.
> > >> -- Any remaining tapes are in I. The single least recently used of
> these is
> > >> also in P.
> > >>
> > >> This algorithm is applied from scratch any time a new tape is needed
> during a
> > >> backup run. You can run the algorithm without running Amanda by doing
> 'amtape
> > >> taper'.
> > >>
> > >> What all of this means from a slightly less mathematical perspective
> is that
> > >> Amanda will not consider overwriting the tapecycle most recent tapes.
> If you
> > >> want to relax this restruction, just reduce tapecycle, and Amanda
> will
> > >> countenance the use of newer (more recently used) tapes.
> > >>
> > >> Alternatively, if you have a specific tape that you want Amanda to
> reuse, just
> > >> relabel it, and it will be treated as a new tape.
> > >>
> > >> --Ian
> > >>
> > >> On Monday 07 August 2006 13:10, HUGHES Marilyn F wrote:
> > >>> We have a situation where the next  Amanda tapes that it is asking
> for
> > >>> are currently offsite.  It costs $75 for them to be retrieved so we
> > >>> don't want to do that.
> > >>>
> > >>>
> > >>> Besides we have available tapes here onsite.  Is there a way (a
> command
> > >>> or other way?) to force Amanda to select one of the tapes that we
> have
> > >>> onsite?  Does Amanda select from the top of the tapelist on down?
> > >
> > >
> > > Ian,
> > >
> > > Thanks for your description.  I was thinking of trying to put together
> > > a description of the tape selection algorithm myself.  But I didn't
> > > know some(most?) of the detail.  Certainly not in mathematical sets.
> > >
> > > One thing still up in the air (to me anyway) is final tape selection
> > > from within the tapelist and physical tape changer.  Your description
> > > gets to which tapes are "eligible" to be selected, but not which tape
> > > (or runtape number of tapes) among that set is ultimately chosen.
> > >
> > > Let me try to use my own terminology to descibe your algorithm so
> > > that I'm sure I understand it.  I'd appreciate corrections to any
> > > mis-statements, in fact or in timing.  And, perhaps you could extend
> > > it by describing the final tape selection.
> > >
> > > From the entire tapelist, those marked "no-reuse" are eliminated
> > > from further consideration.  Only those marked "reuse" are considered.
> > > (is there any other tapelist classification?)
> > >
> > > The reuse"able" list is divided into "previously used" and "never
> used"
> > > (have a valid date stamp or have a 0 date stamp respectively).
> > >
> > > The previously used tapes are date-sorted and the most recently used
> > > tapecycle-1 of those are eliminated from further consideration.  This
> > > would be your "active" set that are reusable but can't be overwritten
> > > at this time as they fall within a tapecycle's number of tapes.
> > >
> > > Any remaining, previously used tapes, plus the labeled but never used
> > > tapes (if any), constitute the set of tapes eligible to be used for
> > > the next run.
> > >
> > > If what I've described is reasonably accurate, none of it is dependent
> > > on tapelist order nor availability in the tape changer.  So the
> physical
> > > device must be accessed before the final selection of a tape to use.
> > >
> > > Does amanda at this point look specifically for the next tape based on
> > > the order in the tapelist file?  (i.e. the last tape in the tapelist
> > > file that is on the eligible list)  Will it scan the entire changer
> > > looking for that specific tape?  Or will it start to scan the changer
> > > looking for any tape from the eligible list?  Or something else?
> > >
> > > Thanks.
> > >
> > > jl
> > If Amanda's behavior hasn't changed (I'm still using 2.4.5), it will
> > use the first non-active tape it finds in the changer.  It appears
> > to just load the next tape until it finds a non-active one, not look
> > for an unused one or find the oldest.
> >
> 
> From this discussion, your and my observations also, it appears the
> order of tapes listed in the tapelist file is immaterial.
> 
> Anyone disagree?
[McGraw, Robert P.] 
Not from what I see. I always reverse sort my tape list so that the oldest
and lowest number is at the bottom. 

zorn->[537] > cat tapelist
0 D00010 reuse
0 D00009 reuse
0 D00008 reuse
0 D00007 reuse
0 D00006 reuse
0 D00005 reuse
0 D00004 reuse
0 D00003 reuse
0 D00002 reuse
0 D00001 reuse

zorn->[538] > amadmin daily tape
The next Amanda run should go onto a new tape.
                                   a new tape.
The next 2 new tapes already labelled are: D00001, D00002.

zorn->[541] > cat tapelist
0 D00001 reuse
0 D00002 reuse
0 D00003 reuse
0 D00004 reuse
0 D00005 reuse
0 D00006 reuse
0 D00007 reuse
0 D00008 reuse
0 D00009 reuse
0 D00010 reuse   
 
zorn->[539] > amadmin daily tape
The next Amanda run should go onto a new tape.
                                   a new tape.
The next 2 new tapes already labelled are: D00010, D00009.

Robert


> 
> --
> Jon H. LaBadie                  jon AT jgcomp DOT com
>  JG Computing
>  4455 Province Line Road        (609) 252-0159
>  Princeton, NJ  08540-4322      (609) 683-7220 (fax)

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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