Imported Upstream version 2.6.1
[debian/amanda] / man / amanda-changers.7
1 .\"     Title: amanda-changers
2 .\"    Author: Dustin J. Mitchell <dustin@zmanda.com>
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4 .\"      Date: 01/22/2009
5 .\"    Manual: Miscellanea
6 .\"    Source: Amanda 2.6.1
7 .\"  Language: English
8 .\"
9 .TH "AMANDA\-CHANGERS" "7" "01/22/2009" "Amanda 2\&.6\&.1" "Miscellanea"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 .de toupper
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18 \\$*
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20 ..
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 .de SH-xref
25 .ie n \{\
26 .\}
27 .toupper \\$*
28 .el \{\
29 \\$*
30 .\}
31 ..
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .de1 SH
36 .\" put an extra blank line of space above the head in non-TTY output
37 .if t \{\
38 .sp 1
39 .\}
40 .sp \\n[PD]u
41 .nr an-level 1
42 .set-an-margin
43 .nr an-prevailing-indent \\n[IN]
44 .fi
45 .in \\n[an-margin]u
46 .ti 0
47 .HTML-TAG ".NH \\n[an-level]"
48 .it 1 an-trap
49 .nr an-no-space-flag 1
50 .nr an-break-flag 1
51 \." make the size of the head bigger
52 .ps +3
53 .ft B
54 .ne (2v + 1u)
55 .ie n \{\
56 .\" if n (TTY output), use uppercase
57 .toupper \\$*
58 .\}
59 .el \{\
60 .nr an-break-flag 0
61 .\" if not n (not TTY), use normal case (not uppercase)
62 \\$1
63 .in \\n[an-margin]u
64 .ti 0
65 .\" if not n (not TTY), put a border/line under subheading
66 .sp -.6
67 \l'\n(.lu'
68 .\}
69 ..
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 .de1 SS
74 .sp \\n[PD]u
75 .nr an-level 1
76 .set-an-margin
77 .nr an-prevailing-indent \\n[IN]
78 .fi
79 .in \\n[IN]u
80 .ti \\n[SN]u
81 .it 1 an-trap
82 .nr an-no-space-flag 1
83 .nr an-break-flag 1
84 .ps \\n[PS-SS]u
85 \." make the size of the head bigger
86 .ps +2
87 .ft B
88 .ne (2v + 1u)
89 .if \\n[.$] \&\\$*
90 ..
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 .de BB
95 .if t \{\
96 .sp -.5
97 .br
98 .in +2n
99 .ll -2n
100 .gcolor red
101 .di BX
102 .\}
103 ..
104 .de EB
105 .if t \{\
106 .if "\\$2"adjust-for-leading-newline" \{\
107 .sp -1
108 .\}
109 .br
110 .di
111 .in
112 .ll
113 .gcolor
114 .nr BW \\n(.lu-\\n(.i
115 .nr BH \\n(dn+.5v
116 .ne \\n(BHu+.5v
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119 .\}
120 .el \{\
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122 .\}
123 .in 0
124 .sp -.5v
125 .nf
126 .BX
127 .in
128 .sp .5v
129 .fi
130 .\}
131 ..
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 .de BM
136 .if t \{\
137 .br
138 .ll -2n
139 .gcolor red
140 .di BX
141 .\}
142 ..
143 .de EM
144 .if t \{\
145 .br
146 .di
147 .ll
148 .gcolor
149 .nr BH \\n(dn
150 .ne \\n(BHu
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152 .in 0
153 .nf
154 .BX
155 .in
156 .fi
157 .\}
158 ..
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
163 .nh
164 .\" disable justification (adjust text to left margin only)
165 .ad l
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
169 .SH "Name"
170 amanda-changers \- Configuring and Using Amanda Changers
171 .SH "DESCRIPTION"
172 .PP
173 Amanda uses changers to arbitrate access to devices (\fBamanda-devices\fR(7)) and data volumes\&. Changers provide an abstraction of tape robots, but are used to manage non\-tape media, too\&. Amanda communicates with changers through the Changer API\&. This manpage contains a
174 \fIuser\-level\fR
175 overview of the API, and does not address details that are only of concern to developers\&. For that purpose, consult the Amanda source code and http://wiki\&.zmanda\&.com\&.
176 .SH "TRANSITION"
177 .PP
178 The Amanda Changer API is in transition from version 1\&.0 \- driven by shell scripts invoked for each changer operation \- to version 2\&.0, composed of perl objects that can manage parallel access to multiple devices and other complexity\&. When this transition is complete, Amanda devices will, in general, be specified via a changer, which will provide the necessary device specifier to access a requested volume\&. In the interim, support for the "new" changer syntax is limited to the experimental
179 \fBamvault\fR(8)\&.
180 .SH "SPECIFYING CHANGERS"
181 .PP
182 Changer specifications are strings like
183 \FCchg\-disk:/my/vtapes\F[]\&. The
184 \FCchg\-\F[]
185 prefix serves to differentiate changers from devices (see
186 \fBamanda-devices\fR(7))\&. The next portion (\FCdisk\F[], in this case) identifies the particular changer driver to use, and everything that follows the
187 \FC:\F[]
188 is interpreted by the driver\&.
189 .PP
190 A name which does not match this pattern, but which matches an old changer script (e\&.g\&.,
191 \FCchg\-zd\-mtx\F[]), invokes the backward\-compatibility changer driver as
192 \FCchg\-compat:chg\-zd\-mtx\F[]\&. If the name does not match an old changer, then it is treated as an Amanda device, and is wrapped by the single\-device changer, e\&.g\&.,
193 \FCchg\-single:tape:/dev/rmt/0\F[]\&.
194 .PP
195 Changers which require additional parameters can also be described in
196 \fBamanda.conf\fR(5)
197 with "changer" sections, for example,
198 .sp
199 .nf
200 define changer hp\-robot {
201     tapedev "chg\-robot:/dev/sg1"
202     property "drives" "0=/dev/nst0;1=/dev/nst0"
203     property "slots" "1\-10"
204 }
205 .fi
206 (note that "chg\-robot" is not yet implemented, so this is hypothetical)\&. A changer defininition creates a changer "alias", in this case named
207 \fIhp\-robot\fR, which can then be named where an application expects a changer \- for example, the target of the
208 \fBamvault\fR
209 command\&.
210 .SH "CHANGER DRIVERS"
211 .PP
212 This section lists the changer drivers included with Amanda, and basic instructions for using them\&. For complete How\-To information, consult the Amanda wiki at http://wiki\&.zmanda\&.com\&.
213 .SS "chg\-disk (new)"
214 .nf
215 tpchanger "chg\-disk:/u01/vtapes"
216 .fi
217 .PP
218 This changer driver replaces the old
219 \fBchg\-disk\fR, supporting parallel access to vtapes stored in directories named
220 \FCslotN\F[]
221 in the directory specified after
222 \FCchg\-disk:\F[]\&. It does so by creating numbered "drives" so that simultaneous processes can access distinct slots\&.
223 .SS "chg\-disk (old)"
224 .nf
225 tapedev "file:/u01/vtapes"
226 tpchanger "chg\-disk"
227 .fi
228 .PP
229 This changer script supports sequential access to vtapes stored in directories named
230 \FCslotN\F[]
231 in the directory specified by the
232 \fItapedev\fR
233 parameter\&.
234 .SS "chg\-multi"
235 .nf
236 tpchanger "chg\-multi"
237 changerfile "chg\-multi\-state"
238 .fi
239 .PP
240 This script simply round\-robins a number of distinct device names, as specified in its configuration file\&. It is useful when all volumes for a configuration have different device names \-\- for example, with S3 devices\&. The
241 \fIchangerfile\fR
242 need not exist; it is used as a prefix for filenames of state files\&.
243 .SS "chg\-manual"
244 .nf
245 tpchanger "chg\-manual"
246 changerfile "chg\-manual\&.conf"
247 .fi
248 .PP
249 This script simply provides distinct device names in a round\-robin fashion, as specified in its configuration file\&. It is useful when all volumes for a configuration have different device names \-\- for example, with S3 devices\&. The configuration file parameters are (as listed in the script):
250 .sp
251 .nf
252 resend_mail=900       # resend mail every __ seconds
253 timeout_mail=604800   # time out after this many seconds (default 7 days)
254 request="[type]"      # How to request a new tape (default "tty_email")
255   request="tty"       # Use the tty to ask the user to change tape\&.
256                       # Can\'t be use by cron
257   request="email"     # Send an email to ask the user to change tape\&.
258   request="tty_email" # Use the tty if it exist or send an email\&.
259 .fi
260 .SS "chg\-zd\-mtx"
261 .nf
262 tpchanger "chg\-zd\-mtx"
263 changerdev "/dev/sg0"         # used with \'mtx \-f\'
264 changerfile "chg\-zd\-mtx\&.conf"
265 tapedev "tape:/dev/nst0"
266 .fi
267 .PP
268 This script interfaces with a tape drive using the Zubkoff/Dandelion version of mtx\&. That\'s the version that takes a device specifier with the
269 \fB\-f\fR
270 option and has subcommands like
271 \fBstatus\fR\&. The configuration file parameters are (as listed in the script itself):
272 .sp
273 .nf
274 firstslot=?                 #### First storage slot (element)
275 lastslot=?                  #### Last storage slot (element)
276 cleanslot=\-1                #### Slot with cleaner tape \-\- default is "\-1"
277                             #### Set negative to indicate no cleaner available
278 driveslot=0                 #### Drive slot number\&.  Defaults to 0
279                             #### Use the \'Data Transfer Element\' you want
280 autoclean=0                 #### Set to \'1\' or greater to enable
281 autocleancount=99           #### Number of access before a clean\&.
282 havereader=0                #### If you have a barcode reader, set to 1\&.
283 offline_before_unload=0     #### Does your robot require an
284                             #### \'mt offline\' before mtx unload?
285 poll_drive_ready=NN         #### Time (seconds) between tests to see if
286                             #### the tape drive has gone ready (default: 3)\&.
287 max_drive_wait=NN           #### Maximum time (seconds) to wait for the
288                             #### tape drive to become ready (default: 120)\&.
289 initial_poll_delay=NN       #### initial delay after load before polling for
290                             #### readiness
291 slotinfofile=FILENAME       #### record slot information to this file, in
292                             #### the line\-based format "SLOT LABEL\en"
293 .fi
294 .SS "chg\-rait"
295 .nf
296 tpchanger "chg\-rait"
297 changerfile "chg\-rait\&.conf"
298 .fi
299 .PP
300 This changer script constructs RAIT devices out of the devices provided by several "sub\-changers"\&. The configuration file specifies
301 \FCnchangers\F[], the number of subchangers, and then provides
302 \FCtpchanger\F[],
303 \FCchangerdev_N\F[],
304 \FCchangerfile_N\F[], and
305 \FCtpchanger_N\F[]
306 for each sub\-changer, 1 through N\&.
307 .SS "chg\-null"
308 .nf
309 tpchanger "chg\-null"
310 .fi
311 .PP
312 This changer always provides the device "null:"\&. It is sometimes useful in conjunction with
313 \fBchg\-rait\fR\&.
314 .SS "Unmaintained Changers"
315 .PP
316 Amanda has many other changer scripts and programs beyond those described here (see the
317 \FCchanger\-src/\F[]
318 in the source directory), but most of these scripts are unmaintained and undocumented, and will be removed when the new changer API is fully implemented\&.
319 .SH "SEE ALSO"
320 .PP
321
322 \fBamanda\fR(8),
323 \fBamanda.conf\fR(5),
324 \fBamanda-devices\fR(7),
325 .SH "Author"
326 .PP
327 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
328 .RS 4
329 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[])
330 .RE