>...  I didn't know at the time that amlabel was updating the tapelist.  ...

Surprise!  :-)

>Now I want to fix this so the tapes will once again be in numerical
>error.  ...

:-) :-) :-)

I assume you meant "order", but I suspect "error" might be closer to
the truth :-).

>It would be confusing to remember that 11 comes after 8, etc. 

Confusing to who?  Amanda certainly doesn't care.  In fact, it's whole
point in life is to keep all that straight.  So, in theory, it doesn't
really matter.

But back in the real world :-), I fully understand wanting the tapes in
"human" order.

>Can I just edit the tapelist file to put them back in order?

Yup, with some caveats.  I answered all this a few days ago and have
appended the summary.

>Jeff Bearer

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

At 2.4.2, amlabel will insert entries in the tapelist file with "0"
as the datestamp.  This effectively causes them to be used next, which
may or may not be what you want.

If that's not what you want (or you're not running 2.4.2 yet), the key
is understanding the order tapes are selected from the tapelist file.

The primary sort key is the datestamp.  Within entries with the same
datestamp, lines later in the file are used first.  This means that in
the normal case, the last tape listed in the file will be the next one
Amanda uses (assuming the file is in reverse datestamp order, which is
how Amanda stores it).

To insert new tapes at a particular point in the cycle, find the tape
they should be used **before** in the tapelist file, insert your new
entries **after** that tape, set their datestamp to the same as the
existing tape, and put the next one to use last in the new set.

For instance, let's say my tapelist looks like this:

  20010306 B00001 reuse
  20010305 B00000 reuse
  20010304 B00006 reuse
  20010303 B00005 reuse
  20010302 B00004 reuse
  20010301 B00003 reuse
  20010228 B00002 reuse

Now I want to add four more tapes, B00007 through B00010, and I want
them to go in their "logical" (at least to the human eye) position in
the sequence, which would be after B00006 (before B00000).  First, I'd
amlabel them.  Then I'd either move/change what amlabel put in the file
or add the entries myself to look like this:

  20010306 B00001 reuse
  20010305 B00000 reuse
  20010305 B00010 reuse
  20010305 B00009 reuse
  20010305 B00008 reuse
  20010305 B00007 reuse
  20010304 B00006 reuse
  20010303 B00005 reuse
  20010302 B00004 reuse
  20010301 B00003 reuse
  20010228 B00002 reuse

The sequence will continue as before (B00002 will be used next).
After B00006 is used, B00007 will be next, then B00008, etc.

Using "amadmin <config> tape" is a good way to test this.  In particular,
temporarily set runtapes to tapecycle and it will tell you the whole
sequence (don't forget to set runtapes back :-).

Reply via email to