Imported Upstream version 3.2.0
[debian/amanda] / man / xml-source / amanda-taperscan.7.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <refentry id='amanda-taperscan.7'>
11
12 <refmeta>
13 <refentrytitle>amanda-taperscan</refentrytitle>
14 <manvolnum>7</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.7;
18 </refmeta>
19 <refnamediv>
20 <refname>amanda-taperscan</refname>
21 <refpurpose>Amanda Taperscan Algorithms</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.dustin;
25 </refentryinfo>
26 <!-- body begins here -->
27
28 <refsect1><title>DESCRIPTION</title>
29
30 <para>Amanda uses a <emphasis>taperscan algorithm</emphasis> to select volumes
31 on which to store dumps.  Historically Amanda has provided only one, fairly
32 complex taperscan algorithm, but this algorithm did not suit the needs of all
33 users.  Now Amanda offers a wide array of algorithms to suit varied needs.
34 Adding new algorithms is not difficult.</para>
35
36 <para>The taperscan algorithm is specified with the <emphasis
37 remap='B'>taperscan</emphasis> parameter, which has a default value of
38 <emphasis remap='B'>traditional</emphasis>.</para>
39
40 <para>Taperscan algorithms are implemented as perl packages with the prefix
41 <filename>Amanda::Taper::Scan::</filename>.  See the perl documentation for
42 <filename>Amanda::Taper::Scan</filename> for more information.</para>
43
44 </refsect1>
45
46 <refsect1><title>TAPERSCAN ALGORITHMS</title>
47
48 <para>In general, these volumes will only select reusable volumes.  These are
49 volumes which are listed in the &tapelist; with the <emphasis>reuse</emphasis>
50 flag, and which are not among the <emphasis>tapecycle-1</emphasis> most recent
51 volumes in the list.  Put another way, reusable volumes do not contain data
52 that must be retained.  Note that if fewer than
53 <emphasis>tapecycle-1</emphasis> volumes have been written then there are no
54 reusable volumes.  Newly labeled volumes (volumes that have been labeled with
55 &amlabel; but never used) are considered reusable.</para>
56
57 <para>Many of these algorithms look for the oldest reusable volume.  In most
58 cases, this is the best volume to overwrite, as the data it contains is older
59 than that on any other volume.  If there are no reusable volumes, then there is
60 no oldest reusable volume.
61 </para>
62
63 <refsect2><title>traditional</title>
64
65 <para>This algorithm duplicates Amanda's historical behavior, and it operates
66 in two stages.</para>
67
68 <para>First, if there is an oldest reusable volume and if the changer supports
69 "fast" searches, then the algorithm uses the changer to search for that volume.
70 Newly labeled volumes are not considered when calculating the oldest reusable
71 volume.  Consequently, this taperscan algorithm prefers volumes which have been
72 used before to newly-labeled volumes when a fast-searchable changer is in
73 use.</para>
74
75 <para>Second, if there is no oldest reusable volume, or if that volume is not
76 available in the changer, then the algorithm begins a sequential scan of the
77 changer, starting at the current slot.  It selects the first suitable volume it
78 finds: a reusable volume (perhaps newly-labeled) or, if
79 <amkeyword>autolabel</amkeyword> includes <amkeyword>empty</amkeyword>, a blank volume.  Even across
80 multiple invocations (when <emphasis>runtapes &gt; 1</emphasis>), it will not
81 return the same slot twice.</para>
82
83 <note>This algorithm shows an undue preference for volumes already containing
84 data, by omitting newly-labeled volumes from its first stage.  Historically,
85 many Amanda changer scripts were not fast-searchable (including
86 <emphasis>chg-multi</emphasis>, <emphasis>chg-disk</emphasis> and, if
87 <emphasis>havereader=0</emphasis>, <emphasis>chg-zd-mtx</emphasis>), and thus
88 skipped the first stage, allowing new volumes to find their way into the tape
89 cycle.  New changers are almost all fast-searchable, so both stages of the
90 algorithm are used and new tapes may be unexpectedly excluded.  If this causes
91 an undesirable change in behavior, consider one of the other taperscan
92 algorithms.</note>
93
94 </refsect2>
95
96 </refsect1>
97
98 <seealso>
99 <manref name="amanda.conf" vol="5"/>,
100 <manref name="tapelist" vol="5"/>,
101 <manref name="amanda-changers" vol="7"/>,
102 </seealso>
103
104 </refentry>
105