Amanda-Users

Re: about reuse/no-reuse

2006-02-05 06:19:20
Subject: Re: about reuse/no-reuse
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: amanda-users AT amanda DOT org
Date: Sun, 05 Feb 2006 12:11:57 +0100
Jon LaBadie schreef:
On Fri, Feb 03, 2006 at 09:35:25PM +0100, Cédric Lucantis wrote:
If my guess is correct, amanda is working fine.  You told it 5
tapes were in rotation but only 3 really are.  It will not use
the 3 again until it gets at least a total of 5 available and
used.
Your guess is correct :) but 1) it works fine with only 3 tapes until it falls on a no-reusable one, 2) I'm using a file driver and I apparently cannot create and/or label more vtapes than the tape cycle, and I cannot choose which tape will be the next (I also read some tricks about this in the archive like manually modifying the tapelist but it does not seem to work).

1) It will work fine with 3 "new" vtapes or with 3 vtapes that are the
   least recently used.  But in general, amanda will never reuse any
   tape if the total number of tapes it has available does not match
   or exceed the tapecycle count.

2) As I haven't used vtapes for a loong time, where do you encounter
   the limitation that the total number of vtapes can not exceed
   tapecycle?

In chg-disk the "tapecycle" parameter is the definition of the
number of slots in the changer.  So, you cannot increase the number of
slots without increasing tapecycle too.

OK, so you cannot add tapes to the changer.
But if you had a real changer, and wanted to put 3 tapes aside, you
would probably take them out of the changer, and insert three new tapes
in it.  That's what you can do with the vtapes in chg-disk too.

You have a directory tree having several directories named "slotX".
Putting some "vtapes" apart is taking the contents of that slotX directory apart:

  $ mkdir -p /savedtapes/daily2/data
  $ mv /amandavtapes/slot2/* /savedtapes/daily2/data/.

I created a directory with the name of the label, not the slot number.
I also created a "simple" standalone vtape of it by putting the tape
contents in subdir named "data". That way you can easily use that tape
to restore from it:

  amrecover daily -d amandahost.example.com:file:/savedtapes/daily2

In the empty slot we just need to create a new tape, with a new unique label (i.e. not "daily2") in that slot:

   $ amlabel daily daily6 slot 2

When you have many "new" tapes, you may need to indicate which tape
is "next". Normally any new tape is good, so Amanda takes the first
"new" tape it finds, that could be "daily7", while "daily6" would be,
for us humans, a more logical choice.  Use "amtape" to position the
chg-disk changer to the tape you like to use next.
(NOTE: "amtape daily show" loops through all the tapes, and leaves
the last one loaded, not the one it started with: a frequent way to
get tapes used out of order!)


--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************

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