Taper scan algorithm: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(Note about chg-disk and tapecycle.)
m (italic, not bold. →‎Other uses of tapecycle)
Line 22: Line 22:


==== Other uses of tapecycle ====
==== Other uses of tapecycle ====
The <tt>tapecycle</tt> configuration parameter, in addition to the usage above, is used by the <tt>chg-disk</tt> changer driver to determine the number of virtual slots. When setting <tt>tapecycle</tt> to something other than the total number of slots in the virtual changer, create a separate configuration for for chg-disk, and specify <tt>LASTSLOT='''n'''</tt>, where '''n''' is the actual number of virtual slots.
The <tt>tapecycle</tt> configuration parameter, in addition to the usage above, is used by the <tt>chg-disk</tt> changer driver to determine the number of virtual slots. When setting <tt>tapecycle</tt> to something other than the total number of slots in the virtual changer, create a separate configuration for for chg-disk, and specify <tt>LASTSLOT=''n''</tt>, where ''n'' is the actual number of virtual slots.

Revision as of 00:25, 22 May 2007

The Taper scan algorithm is the algorithm used to determine which volume, if any, is the next to be written by taper. The 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, PI, and AI = ∅.

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 sets as follows:

  • Any labeled but unused tapes are in both I and P. This includes unlabeled tapes if the label_new_tapes option is set.
  • The most recently used "tapecycle" - 1 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'.

Other uses of tapecycle

The tapecycle configuration parameter, in addition to the usage above, is used by the chg-disk changer driver to determine the number of virtual slots. When setting tapecycle to something other than the total number of slots in the virtual changer, create a separate configuration for for chg-disk, and specify LASTSLOT=n, where n is the actual number of virtual slots.