Amanda-Users

Re: amcheck not saying "expecting tapeno. or a new tape"

2004-11-06 12:42:00
Subject: Re: amcheck not saying "expecting tapeno. or a new tape"
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Sat, 6 Nov 2004 12:35:09 -0500
On Sat, Nov 06, 2004 at 05:14:57AM +0000, Gavin Henry wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> > I suspect you have only done one backup, thus only previously used one
> > tape.
> >
> > You think there is an order to the tapes, 2 follows 1 etc.  Amanda could
> > care less what "new tape" it writes to next.  If you put in tape3 next,
> > amanda's order will have 3 following 1 in the future.  If you labelstr
> > allows it (tape.*) amanda will happily use tape-gavin next and tape-henry
> > after that.
> >
> > There seems to be no problem (from what I see anyway).
> >
> 
> Only one backup has been done, but why would amadmin config tape give me the 
> right next tape, but the e-mail/amcheck doesn't?

The snarky answer is that they use different logic.

Hmm, now the question becomes how and why they use different logic.
I do not recall your saying what tape amadmin config says is due.
I'm guessing it says "tape2" and again, if I recall correctly,
amcheck says "new tape".

I'll first challenge your determination that amadmin is "right".
You have not "used" the number of tapes in your tapecycle yet.
So the correct answer, whether you like it or not, is "a new tape"
labelled, but unused previously.  So, amcheck saying "new tape"
is correct, because you have not yet written to your entire
tape cycle.  It will expect, and use, a new tape with any label
in the drive the next time an amdump is run.  If you had tape2
in the drive, it would have reported it was a appropriate tape.

amadmin, without looking at the source, appears to be looking
at the tapelist file and not checking whether a new tape is
required.  Thus it is just saying this is the next tape listed
in the tapelist file.  But it is incorrect because you could
stick in tape 12 at this time and amcheck and amdump would be
happy.  After the tapes have been used, and their order set,
then amcheck and amdump will be more particular about which
tape is valid.

I think the real question is whether it is worth the effort to
get amadmin to do the "have tapecycle number of tapes been used"
check rather than just report the next tape in the tapelist.

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