Imported Upstream version 3.2.0
[debian/amanda] / man / amanda-taperscan.7
1 '\" t
2 .\"     Title: amanda-taperscan
3 .\"    Author: Dustin J. Mitchell <dustin@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
5 .\"      Date: 10/18/2010
6 .\"    Manual: Miscellanea
7 .\"    Source: Amanda 3.2.0
8 .\"  Language: English
9 .\"
10 .TH "AMANDA\-TAPERSCAN" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 amanda-taperscan \- Amanda Taperscan Algorithms
23 .SH "DESCRIPTION"
24 .PP
25 Amanda uses a
26 \fItaperscan algorithm\fR
27 to select volumes on which to store dumps\&. Historically Amanda has provided only one, fairly complex taperscan algorithm, but this algorithm did not suit the needs of all users\&. Now Amanda offers a wide array of algorithms to suit varied needs\&. Adding new algorithms is not difficult\&.
28 .PP
29 The taperscan algorithm is specified with the
30 \fBtaperscan\fR
31 parameter, which has a default value of
32 \fBtraditional\fR\&.
33 .PP
34 Taperscan algorithms are implemented as perl packages with the prefix
35 Amanda::Taper::Scan::\&. See the perl documentation for
36 Amanda::Taper::Scan
37 for more information\&.
38 .SH "TAPERSCAN ALGORITHMS"
39 .PP
40 In general, these volumes will only select reusable volumes\&. These are volumes which are listed in the
41 \fBtapelist\fR(5)
42 with the
43 \fIreuse\fR
44 flag, and which are not among the
45 \fItapecycle\-1\fR
46 most recent volumes in the list\&. Put another way, reusable volumes do not contain data that must be retained\&. Note that if fewer than
47 \fItapecycle\-1\fR
48 volumes have been written then there are no reusable volumes\&. Newly labeled volumes (volumes that have been labeled with
49 \fBamlabel\fR
50 but never used) are considered reusable\&.
51 .PP
52 Many of these algorithms look for the oldest reusable volume\&. In most cases, this is the best volume to overwrite, as the data it contains is older than that on any other volume\&. If there are no reusable volumes, then there is no oldest reusable volume\&.
53 .SS "traditional"
54 .PP
55 This algorithm duplicates Amanda\'s historical behavior, and it operates in two stages\&.
56 .PP
57 First, if there is an oldest reusable volume and if the changer supports "fast" searches, then the algorithm uses the changer to search for that volume\&. Newly labeled volumes are not considered when calculating the oldest reusable volume\&. Consequently, this taperscan algorithm prefers volumes which have been used before to newly\-labeled volumes when a fast\-searchable changer is in use\&.
58 .PP
59 Second, if there is no oldest reusable volume, or if that volume is not available in the changer, then the algorithm begins a sequential scan of the changer, starting at the current slot\&. It selects the first suitable volume it finds: a reusable volume (perhaps newly\-labeled) or, if
60 \fBautolabel\fR
61 includes
62 \fBempty\fR, a blank volume\&. Even across multiple invocations (when
63 \fIruntapes > 1\fR), it will not return the same slot twice\&.
64 .if n \{\
65 .sp
66 .\}
67 .RS 4
68 .it 1 an-trap
69 .nr an-no-space-flag 1
70 .nr an-break-flag 1
71 .br
72 .ps +1
73 \fBNote\fR
74 .ps -1
75 .br
76 This algorithm shows an undue preference for volumes already containing
77 data, by omitting newly\-labeled volumes from its first stage\&.  Historically,
78 many Amanda changer scripts were not fast\-searchable (including
79 \fIchg\-multi\fR, \fIchg\-disk\fR and, if
80 \fIhavereader=0\fR, \fIchg\-zd\-mtx\fR), and thus
81 skipped the first stage, allowing new volumes to find their way into the tape
82 cycle\&.  New changers are almost all fast\-searchable, so both stages of the
83 algorithm are used and new tapes may be unexpectedly excluded\&.  If this causes
84 an undesirable change in behavior, consider one of the other taperscan
85 algorithms\&..sp .5v
86 .RE
87 .SH "SEE ALSO"
88 .PP
89 \fBamanda\fR(8),
90 \fBamanda.conf\fR(5),
91 \fBtapelist\fR(5),
92 \fBamanda-changers\fR(7)
93 .PP
94 The Amanda Wiki:
95 : http://wiki.zmanda.com/
96 .SH "AUTHOR"
97 .PP
98 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
99 .RS 4
100 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
101 .RE