Imported Upstream version 3.3.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: 06/02/2011
6 .\"    Manual: Miscellanea
7 .\"    Source: Amanda 3.3.0
8 .\"  Language: English
9 .\"
10 .TH "AMANDA\-TAPERSCAN" "7" "06/02/2011" "Amanda 3\&.3\&.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 "DEFINING A TAPERSCAN"
39 .PP
40 An taperscan is defined in
41 \fBamanda.conf\fR(5)
42 as follows:
43 .sp
44 .nf
45 define taperscan $taperscan_name {
46    comment "$comment"
47    plugin "$pluginname"
48    property "$PROPERTY_NAME" "$PROPERTY_VALUE"
49    \&.\&.\&.
50 }
51 .fi
52 and then referenced in the global section as
53 .sp
54 .nf
55   taperscan "$taperscan_name"
56 .fi
57 .PP
58 Taperscan properties, like Amanda configuration parameters, are insensitive to case, and
59 \-
60 (dash) and
61 _
62 (underscore) may be used interchangeably\&.
63 .PP
64 See the individual plugin documentation below for properties applicable to each plugin\&.
65 .SH "TAPERSCAN ALGORITHMS"
66 .PP
67 In general, these algorithms will only select reusable volumes\&. These are volumes which are listed in the
68 \fBtapelist\fR(5)
69 with the
70 \fIreuse\fR
71 flag, and which are not among the
72 \fItapecycle\-1\fR
73 most recent volumes in the list\&. Put another way, reusable volumes do not contain data that must be retained\&. Note that if fewer than
74 \fItapecycle\-1\fR
75 volumes have been written then there are no reusable volumes\&. Newly labeled volumes (volumes that have been labeled with
76 \fBamlabel\fR
77 but never used) are considered reusable\&.
78 .PP
79 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\&.
80 .SS "traditional"
81 .PP
82 This algorithm duplicates Amanda\'s historical behavior, and it operates in two stages\&.
83 .PP
84 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\&.
85 .PP
86 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
87 \fBautolabel\fR
88 includes
89 \fBempty\fR, a blank volume\&. Even across multiple invocations (when
90 \fIruntapes > 1\fR), it will not return the same slot twice\&.
91 .if n \{\
92 .sp
93 .\}
94 .RS 4
95 .it 1 an-trap
96 .nr an-no-space-flag 1
97 .nr an-break-flag 1
98 .br
99 .ps +1
100 \fBNote\fR
101 .ps -1
102 .br
103 This algorithm shows an undue preference for volumes already containing
104 data, by omitting newly\-labeled volumes from its first stage\&.  Historically,
105 many Amanda changer scripts were not fast\-searchable (including
106 \fIchg\-multi\fR, \fIchg\-disk\fR and, if
107 \fIhavereader=0\fR, \fIchg\-zd\-mtx\fR), and thus
108 skipped the first stage, allowing new volumes to find their way into the tape
109 cycle\&.  New changers are almost all fast\-searchable, so both stages of the
110 algorithm are used and new tapes may be unexpectedly excluded\&.  If this causes
111 an undesirable change in behavior, consider one of the other taperscan
112 algorithms\&..sp .5v
113 .RE
114 .SS "oldest"
115 .PP
116 This algorithm works with the Changer API (see
117 \fBamanda-changers\fR(7)), using the inventory returned by the changer to locate the oldest acceptable volume available\&. Note that this will not work with changers that do not support inventory (old changers)\&. The algorithms scans unknown slots only if no known usable volume is found in the inventory\&.
118 .PP
119 An acceptable volume is a reusable volume, a new labeled volume or an unlabeled volume that can be labeled according to
120 \fBautolabel\fR\&. Note that changers do not always know the contents of every slot \- for example, a tape with an unknown barcode will not be considered usable\&.
121 .PP
122 Use
123 \fBamtape CONF inventory\fR
124 to see the changer\'s inventory, and use
125 \fBamtape CONF update\fR
126 to update it\&.
127 .SS "lexical"
128 .PP
129 This algorithm also works with the Changer API, using the inventory to determine the acceptable volumes; it then uses the volume which follows the last\-used volume in lexical order\&. For volume labels containing leading zeros, e\&.g\&.,
130 CORP\-010, this algorithm will run through the volumes in the natural order\&.
131 .PP
132 It scans unknown slots only if no usable volume is found in the inventory\&.
133 .PP
134 See
135 \fBoldest\fR, above, for a definition of acceptable volumes\&.
136
137
138 >>>>>>> 6a40a39\&.\&.\&. manpage edits
139 .SH "SEE ALSO"
140 .PP
141 \fBamanda\fR(8),
142 \fBamanda.conf\fR(5),
143 \fBtapelist\fR(5),
144 \fBamanda-changers\fR(7),
145 \fBamanda-interactivity\fR(7)
146 .PP
147 The Amanda Wiki:
148 : http://wiki.zmanda.com/
149 .SH "AUTHOR"
150 .PP
151 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
152 .RS 4
153 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
154 .RE