Imported Upstream version 3.2.0
[debian/amanda] / man / amanda-changers.7
1 '\" t
2 .\"     Title: amanda-changers
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\-CHANGERS" "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-changers \- Configuring and Using Amanda Changers
23 .SH "DESCRIPTION"
24 .PP
25 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
26 \fIuser\-level\fR
27 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\&.
28 .SH "TRANSITION"
29 .PP
30 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\&. At this point, all Amanda programs use the new Changer API directly, although 1\&.0 changer scripts are still fully supported via
31 chg\-compat\&.
32 .PP
33 The Changer API strives to treat all changers identically, so that Amanda\'s behavior is independent of the changer in use\&. However, some parts of Amanda operate differently depending on whether a changer can efficiently search for a volume with a given label\&. This distinction is really only apparent with tape libraries: those with barcode readers can quickly find a desired tape, while those without may fall back to an inefficient scan of each volume\&. The capability to perform quick searches is called "fast\-search", and each changer is annotated below to indicate its support\&.
34 .SH "SPECIFYING CHANGERS"
35 .PP
36 Changer specifications are strings like
37 chg\-disk:/my/vtapes\&. The
38 chg\-
39 prefix serves to differentiate changers from devices (see
40 \fBamanda-devices\fR(7))\&. The next portion (disk, in this case) identifies the particular changer driver to use, and everything that follows the
41 :
42 is interpreted by the driver\&. Note that the
43 :
44 character is required, even when nothing follows it\&. This is an easy way to distinguish new changer specifications from old\&.
45 .PP
46 A name which does not match this pattern, but which matches an old changer script (e\&.g\&.,
47 chg\-zd\-mtx), invokes the backward\-compatibility changer driver as e\&.g\&.,
48 chg\-compat:chg\-zd\-mtx\&. 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\&.,
49 chg\-single:tape:/dev/rmt/0\&.
50 .PP
51 Changers which require additional parameters can also be described in
52 \fBamanda.conf\fR(5)
53 with "changer" sections\&. Such a changer defininition creates a changer "alias", in this case named
54 \fIhp\-robot\fR, which can then be named where an application expects a changer \- for example, the target of the
55 \fBamvault\fR
56 command or in a global
57 \fBtpchanger\fR
58 parameter\&.
59 .SS "CONFIGURATION"
60 .PP
61 The preferred method of specifying configuration for a changer is as a "changer" section in
62 \fBamanda.conf\fR(5)\&. The
63 \fItapedev\fR
64 parameter then indicates, by name, the changer that will be used by default by most Amanda programs\&. For example:
65 .sp
66 .nf
67 define changer hp\-robot {
68     tapedev "chg\-robot:/dev/sg1"
69     property "tape\-device" "0=tape:/dev/nst0"
70     property append "tape\-device" "1=tape:/dev/nst1"
71     device\-property "BLOCK_SIZE" "512k"
72 }
73 # \&.\&.\&.
74 tapedev "hp\-robot"
75 .fi
76 .PP
77 Several changer drivers accept
78 \fIchanger properties\fR
79 which control the behavior of the changer\&. These properties must be specified in a changer definition, as in the
80 \fIhp\-robot\fR
81 example, above\&.
82 .PP
83 Devices, too, can take properties to control their behavior (see
84 \fBamanda-devices\fR(7))\&. Device properties can come from four places: implicit device properties (from tapetype parameters), global device properties (from global
85 \fIdevice\-property\fR
86 parameters), properties in device definitions, and properties in changer definitions\&. Properties are applied in this order, with later properties taking priority\&.
87 .PP
88 There are only three implicit properties:
89 \fIMAX_VOLUME_USAGE\fR
90 is set based on the tapetype
91 \fIlength\fR
92 parameter,
93 \fIREAD_BLOCK_SIZE\fR
94 is set if
95 \fIreadblocksize\fR
96 is set, and
97 \fIBLOCK_SIZE\fR
98 is set based on the
99 \fIblocksize\fR
100 parameter\&.
101 .PP
102 Global device properties always apply\&. If the changer specifies a device by alias, then device properties from the definition apply\&. If the changer is specified by an alias, then properties from that definition applied\&.
103 .SH "CHANGER DRIVERS"
104 .PP
105 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\&.
106 .SS "chg\-disk:VTAPEROOT (new)"
107 .nf
108 tpchanger "chg\-disk:/u01/vtapes"
109 .fi
110 .PP
111 This changer driver replaces the old
112 \fBchg\-disk\fR, supporting parallel access to vtapes stored in directories named
113 slotN
114 in the directory specified after
115 chg\-disk:\&. It does so by creating numbered "drives" so that simultaneous processes can access distinct slots\&. This changer is fast\-search capable\&.
116 .PP
117 The current slot can be accessed using the device name
118 file:VTAPEROOT\&. This is useful for the
119 \fBamrestore\fR(8)
120 command line\&.
121 .SS "chg\-disk (old)"
122 .nf
123 tapedev "file:/u01/vtapes"
124 tpchanger "chg\-disk"
125 changerfile "chg\-disk\&.conf"     # optional file
126 .fi
127 .PP
128 This changer script supports sequential access to vtapes stored in directories named
129 slotN
130 in the directory specified by the
131 \fItapedev\fR
132 parameter\&. The configuration file parameter is:
133 .sp
134 .nf
135 LASTSLOT=number    # The number of slots, default to tapecycle setting\&.
136 .fi
137 .PP
138 This changer is not fast\-search capable\&.
139 .SS "chg\-multi:DEVICE\-LIST"
140 .nf
141 tpchanger "chg\-multi:{/dev/nst0,/dev/nst1,/dev/nst2}"
142 changerfile "chg\-multi\-state"
143 .fi
144 .PP
145 This script simply round\-robins a number of distinct device names, as specified in the
146 \fItpchanger\fR
147 setting\&. It is useful when all volumes for a configuration have different device names \-\- for example, if you have many standalone drive\&. The
148 \fIchangerfile\fR
149 must exist; it is used to save the state file\&.
150 .PP
151 The child devices are specified using the same syntax as for the RAIT device (see
152 \fBamanda-changers\fR(7))\&. The range specification can be especially useful here:
153 .sp
154 .nf
155 tpchanger "chg\-multi:s3:mycompany\-backups/tape\-{001\&.\&.100}"
156 .fi
157 .PP
158 This changer is not fast\-search capable\&.
159 .SS "Properties"
160 .PP
161 FIRST\-SLOT
162 .RS 4
163
164 This property gives the number of the first slot\&. The default value is "1"\&.
165 .RE
166 .SS "Special Operations"
167 .PP
168 A number of special operations are available for
169 \fBchg\-multi\fR
170 via
171 \fBamtape\fR(8)
172 subcommands\&.
173 .PP
174 The
175 \fBreset\fR
176 subcommand will change the current slot to the first available slot, but does not erase any stored state maintained by the changer\&.
177 .PP
178 The
179 \fBeject\fR
180 subcommand will eject the volume in the given drive
181 .PP
182 The
183 \fBclean\fR
184 subcommand is not yet implemented\&.
185 .PP
186 The
187 \fBupdate\fR
188 subcommand instructs the changer to update its state database\&. Given no arguments, the changer will scan all available slots, loading each tape and reading its label\&. Especially for large libraries, this can take a long time\&. If only a few slots have changed, they can be listed on the command line:
189 .sp
190 .nf
191 amtape CONFIG update 1\-3,9
192 .fi
193 In this case, the changer will only scan the stated slots\&. Finally, the changer will not scan at all if it is given the tape label for the slot:
194 .sp
195 .nf
196 amtape CONFIG update 2=DailySet\-028
197 .fi
198 In this case, the changer updates its state to indicate that
199 DailySet\-028
200 is in slot 2, without trying to load the tape\&.
201 .sp
202 .nf
203 amtape CONFIG update 1\-3,9=
204 .fi
205 In this case, the changer marks the stated slots as an unknown state\&.
206 .SS "chg\-multi (old)"
207 .nf
208 tpchanger "chg\-multi"
209 changerfile "chg\-multi\-state"
210 .fi
211 .PP
212 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
213 \fIchangerfile\fR
214 need not exist; it is used as a prefix for filenames of state files\&.
215 .PP
216 The configuration file has simple lines with a parameter and its value separated by a space\&. The # character introduces a comment\&. The configuration parameters are:
217 .PP
218 multieject
219 .RS 4
220 If this is 1, use an \'mt
221 offline\' command to change to the next tape, or multiple such commands for
222 skipping several tapes at a time\&.
223 .RE
224 .PP
225 needeject
226 .RS 4
227 This option is incompatible with
228 \'multieject\'\&. This should be 1 for changers accessed through several virtual
229 tape devices, when the changer needs the current tape to be ejected before
230 changing to another device\&.
231 .RE
232 .PP
233 gravity
234 .RS 4
235 Set this to 1 if the
236 changer/stacker is unable to loop back to the first tape after unloading the
237 last one, or if you don\'t want amanda to go through the tape stack looking for
238 the exact tape it wants instead of using the first acceptable one\&.
239 .RE
240 .PP
241 slot X
242 .RS 4
243 The configuration file should list
244 as many \'slot X\' statements as the number of slots supported by the changer or
245 the number of separate tape drives used\&.
246 .RE
247 .PP
248 This changer is not fast\-search capable\&.
249 .SS "chg\-manual"
250 .nf
251 tpchanger "chg\-manual"
252 changerfile "chg\-manual\&.conf"
253 .fi
254 .PP
255 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):
256 .sp
257 .nf
258 resend_mail=900       # resend mail every __ seconds
259 timeout_mail=604800   # time out after this many seconds (default 7 days)
260 request="[type]"      # How to request a new tape (default "tty_email")
261   request="tty"       # Use the tty to ask the user to change tape\&.
262                       # Can\'t be use by cron
263   request="email"     # Send an email to ask the user to change tape\&.
264   request="tty_email" # Use the tty if it exist or send an email\&.
265 .fi
266 .PP
267 This changer is not fast\-search capable\&.
268 .SS "chg\-zd\-mtx (old)"
269 .nf
270 tpchanger "chg\-zd\-mtx"
271 changerdev "/dev/sg0"         # used with \'mtx \-f\'
272 changerfile "chg\-zd\-mtx\&.conf"
273 tapedev "tape:/dev/nst0"
274 .fi
275 .PP
276 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
277 \fB\-f\fR
278 option and has subcommands like
279 \fBstatus\fR\&. The configuration file parameters are (as listed in the script itself):
280 .sp
281 .nf
282 firstslot=?                 #### First storage slot (element)
283 lastslot=?                  #### Last storage slot (element)
284 cleanslot=\-1                #### Slot with cleaner tape \-\- default is "\-1"
285                             #### Set negative to indicate no cleaner available
286 driveslot=0                 #### Drive slot number\&.  Defaults to 0
287                             #### Use the \'Data Transfer Element\' you want
288 autoclean=0                 #### Set to \'1\' or greater to enable
289 autocleancount=99           #### Number of access before a clean\&.
290 havereader=0                #### If you have a barcode reader, set to 1\&.
291 offline_before_unload=0     #### Does your robot require an
292                             #### \'mt offline\' before mtx unload?
293 poll_drive_ready=NN         #### Time (seconds) between tests to see if
294                             #### the tape drive has gone ready (default: 3)\&.
295 max_drive_wait=NN           #### Maximum time (seconds) to wait for the
296                             #### tape drive to become ready (default: 120)\&.
297 initial_poll_delay=NN       #### initial delay after load before polling for
298                             #### readiness
299 slotinfofile=FILENAME       #### record slot information to this file, in
300                             #### the line\-based format "SLOT LABEL\en"
301 .fi
302 .PP
303 This changer is fast\-search capable if and only if
304 \fBhavereader\fR
305 is true\&.
306 .SS "chg\-rait:{CHILD1,CHILD2,\&.\&.}"
307 .nf
308 define changer vtape {
309     tpcanger "chg\-disk:/path/to/vtape"
310 }
311 define changer robot {
312     tpchanger "chg\-robot:/dev/sg0"
313     tapedev "tape:/dev/nst0"
314 }
315 tpchanger "chg\-rait:{vtape,robot}"
316 .fi
317 .PP
318 This changer script constructs RAIT devices out of the devices provided by several "sub\-changers"\&. The sub\-changers are specified using the same shell\-like syntax as the RAIT device (see
319 \fBamanda-devices\fR(7))\&.
320 .PP
321 Chg\-rait does not require that all of the child changers have the same slot names: compound slot names are created by combining the slot names supplied by the child changers using the same shell\-like syntax\&. For example, if the child changers return slots "top", "strange", and "3", then the RAIT changer will return "{top,strange,3}"\&. This makes it possible to, for example, mirror data on tapes in slots 1\-10 to tapes in slots 11\-20 of the same robot, using two
322 \fBchg\-zd\-mtx\fR
323 child changers (and, naturally, two tape drives)\&. In this arrangement, the first slot would be named
324 {1,11}\&.
325 .PP
326 As a convenience to the user, the RAIT changer will also accept un\-braced slot names, and supply the same name to each child changer\&. Thus with a 4\-device RAIT changer, "17" is equivalent to "{17,17,17,17}"\&.
327 .PP
328 Drive names are parsed in a similar fashion, for operations that take drive names (clean and eject)\&.
329 .PP
330 This changer is fast\-search capable only if all of its child changers are fast\-search capable\&.
331 .if n \{\
332 .sp
333 .\}
334 .RS 4
335 .it 1 an-trap
336 .nr an-no-space-flag 1
337 .nr an-break-flag 1
338 .br
339 .ps +1
340 \fBNote\fR
341 .ps -1
342 .br
343 The old chg\-rait script is no longer supported nor shipped with Amanda, although the old script will continue to function via \fBchg\-compat\fR, giving users time to upgrade their configuration\&.
344 .sp .5v
345 .RE
346 .SS "chg\-null:"
347 .nf
348 tpchanger "chg\-null:"
349 .fi
350 .PP
351 This changer always provides the device "null:"\&. It is sometimes useful in conjunction with
352 \fBchg\-rait:\fR\&.
353 .SS "chg\-robot:DEVICE"
354 .nf
355 define changer robot {
356     tpchanger "chg\-robot:/dev/sg0"
357     property "tape\-device" "0=tape:/dev/rmt/0" "1=tape:/dev/rmt/1"
358     property "eject\-before\-unload" "yes"
359     property "use\-slots" "1\-5,11\-20"
360 }
361 tpchanger "robot"
362 .fi
363 .PP
364 This changer drives a robotic tape library using the operating system\'s
365 \fBmtx\fR
366 command\&. It replaces the ancient
367 \fBchg\-zd\-mtx\fR
368 script\&. The changer uses all of the information available to operate as efficiently as possible\&. Even without a barcode reader, the changer can usually load a tape immediately, without resorting to a sequential scan of many tapes\&. It is capable of sharing state across multiple Amanda configurations, avoiding conflicts and optimally tracking the contents of the library\&.
369 .PP
370 This changer does not accept a
371 \fBchangerdev\fR
372 parameter, but the
373 \fBchangerfile\fR
374 parameter can be used to specify a filename at which it should store its state\&. Ordinarily, this state is stored in a file named after the changer device under
375 \fI$localstatedir/amanda\fR, e\&.g\&.,
376 \fB/var/amanda/chg\-robot\-dev\-sg0\fR\&. There should be a single such statefile for each distinct tape library attached to the Amanda server, even if multiple Amanda configurations reference that library\&.
377 .PP
378 With a barcode reader present, it is possible for
379 \fBchg\-robot\fR
380 to track the state of the library reliably, even recognizing tapes that are removed and later re\-inserted (by remembering their barcodes)\&. Without barcodes, the changer can still remember the slot in which it last saw the tape with a particular label, although this information can become stale if the tapes are rearranged by an operator\&. In any case, the changer will never "hunt" for a tape by repeatedly loading slots and checking labels\&. If the changer\'s state is inaccurate, use the
381 \fBamtape\fR(8)
382 subcommand
383 \fBupdate\fR\&.
384 .PP
385 This changer is fast\-search capable even without a barcode reader\&. For such libraries, it is the responsibility of the operator to
386 \fBupdate\fR
387 the changer when tapes are added to or removed from the library\&.
388 .PP
389 There is a shell script in the
390 contrib/
391 directory of Amanda\'s source distribution which can help you convert a
392 \fBchg\-zd\-mtx\fR
393 configuration into a
394 \fBchg\-robot\fR
395 configuration\&. Just give it your Amanda configuration name:
396 .sp
397 .nf
398   sh contrib/convert\-zd\-mtx\-to\-robot\&.sh $config
399 .fi
400 The script can be downloaded at
401 http://github\&.com/zmanda/amanda/raw/master/contrib/convert\-zd\-mtx\-to\-robot\&.sh
402 .SS "Special Operations"
403 .PP
404 A number of special operations are available for
405 \fBchg\-robot\fR
406 via
407 \fBamtape\fR(8)
408 subcommands\&.
409 .PP
410 The
411 \fBreset\fR
412 subcommand will change the current slot to the first available slot, but does not erase any stored state maintained by the changer\&.
413 .PP
414 The
415 \fBeject\fR
416 subcommand will unload the volume in the given drive, ejecting first if the changer properties dictate\&. Note that, despite the subcommand name, the changer attempts to avoid the state where a volume has been ejected from the drive but not unloaded back to a storage slot\&.
417 .PP
418 The
419 \fBclean\fR
420 subcommand is not yet implemented\&.
421 .PP
422 The
423 \fBupdate\fR
424 subcommand instructs the changer to update its state database\&. Given no arguments, the changer will scan all available slots, loading each tape and reading its label\&. Especially for large libraries, this can take a long time\&. If only a few slots have changed, they can be listed on the command line:
425 .sp
426 .nf
427 amtape CONFIG update 1\-3,9
428 .fi
429 In this case, the changer will only scan the stated slots\&. Finally, the changer will not scan at all if it is given the tape label for the slot:
430 .sp
431 .nf
432 amtape CONFIG update 2=DailySet\-028
433 .fi
434 In this case, the changer updates its state to indicate that
435 DailySet\-028
436 is in slot 2, without trying to load the tape\&.
437 .sp
438 .nf
439 amtape CONFIG update 1\-3,9=
440 .fi
441 In this case, the changer marks the stated slots as an unknown state\&.
442 .SS "Properties"
443 .PP
444 DRIVE\-CHOICE
445 .RS 4
446
447 This property controls the algorithm used to select a drive in which to load a
448 tape\&.  If set to the default ("lru"), the changer attempts to use the least
449 recently used drive, resulting in a round\-robin behavior\&.  The "firstavail"
450 algorithm selects the first available drive, thus preferring the first drive
451 specified via the TAPE\-DEVICE property\&.
452 .RE
453 .PP
454 EJECT\-BEFORE\-UNLOAD
455 .RS 4
456
457 Set this boolean property to true if the library requires an
458 \fBoffline\fR operation be performed on the tape drive before it
459 can be unloaded\&.  If set, then \fBmt\fR will be invoked to
460 perform this operation\&.  Most libraries do not require this workaround\&.
461 .RE
462 .PP
463 EJECT\-DELAY
464 .RS 4
465
466 This is the time between ejecting a tape and unloading the volume to a storage slot, and
467 defaults to 0 seconds\&.  It is only used if EJECT\-BEFORE\-UNLOAD is true\&.  See "Timing", below\&.
468 .RE
469 .PP
470 FAST\-SEARCH
471 .RS 4
472
473 This boolean property indicates whether the changer advertises the ability to find
474 volumes without sequential scanning\&.  The traditional taperscan algorithm alters its
475 behavior based on this flag, so it is sometimes necessary to adjust it, although the
476 changer will always search for a desired tape using the most efficient means
477 available\&.  The default value is true\&.
478 .RE
479 .PP
480 IGNORE\-BARCODES
481 .RS 4
482
483 If this boolean property is true, then chg\-robot will ignore any barcode information
484 that the library provides\&.  This property is probably only useful when the library
485 returns incorrect barcodes, for example due to a malfunction in the barcode reader\&.
486 .RE
487 .PP
488 LOAD\-POLL
489 .RS 4
490 This property specifies the timing of Amanda\'s polling for the tape drive to be ready after loading a new tape\&. See "Timing", below\&.
491 .sp
492 The script "polls" by trying to open the tape device repeatedly until no error is encountered\&. The property specifies the time to wait before the first poll (D), the frequency at which to poll and retry on errors (P); and the time after which it should give up (U)\&. The format is
493 .sp
494 .nf
495 "D [poll P [until U]]"
496 .fi
497 For a simple delay with no polling, use e\&.g\&.,
498 .sp
499 .nf
500 property "load\-poll" "13s"
501 .fi
502 To delay and then poll, use e\&.g\&.,
503 .sp
504 .nf
505 property "load\-poll" "13s poll 5s"
506 .fi
507 and to add a maximum total time, use e\&.g\&.,
508 .sp
509 .nf
510 property "load\-poll" "0s poll 5s until 2m"
511 .fi
512 The default value is
513 \fB"0s poll 3s until 2m"\fR\&.
514 .RE
515 .PP
516 MTX
517 .RS 4
518
519 The path to the \'mtx\' binary\&.  The default value is defined at compile time\&.
520 .RE
521 .PP
522 STATUS\-INTERVAL
523 .RS 4
524
525 This is the minimum time between invocations of \fBmtx status\fR
526 to determine the state of the changer library\&.  The default value, 2 seconds,
527 avoids back\-to\-back status invocations but ensures that the metadata is up to
528 date\&.  For operating systems or libraries where the \fBmtx
529 status\fR takes a considerable time to complete, this value should be
530 increased\&.  See "Timing", below\&.
531 .RE
532 .PP
533 TAPE\-DEVICE
534 .RS 4
535
536 This property describes the correspondance of drive numbers in the library to
537 Amanda devices, in the format \fIDRIVE=DEVICE\fR\&.  The property
538 can be specified multiple times to describe multiple devices\&.  The device will
539 usually be a tape device name starting with \fBtape:\fR, but may
540 also refer to a device alias (see \fBamanda-devices\fR(7))\&. As
541 a shortcut, if the \fBtapedev\fR parameter is specified in the
542 changer definition, then it is assumed to be the device name for drive 0\&.
543 .RE
544 .PP
545 UNLOAD\-DELAY
546 .RS 4
547
548 This specifies the minimum time between an unload operation any any subsequent
549 operation\&.  The default value is 0 seconds\&.  See "Timing", below\&.
550 .RE
551 .PP
552 USE\-SLOTS
553 .RS 4
554
555 This property, if specifies, enumerates the slots to which this changer should
556 limit itself\&.  The slots are specified as a comma\-separated list of ranges,
557 e\&.g\&., "1\-5,11\-15,19,22"\&.  The property can be specified more than once, and
558 the resulting sets will be combined\&.  The changer will refuse to load tapes
559 not found in these slots, except for import/export purposes\&.
560 .RE
561 .SS "Timing"
562 .PP
563 Tape libraries are fickle, and in many cases will report that an operation is complete when it is still in progress\&. Chg\-robot takes several timing\-related properties to accomodate such behavior\&.
564 .PP
565 A typical sequence of operations performed during a load are: get library status, eject a tape, unload the tape back to a storage slot, load a new tape, and read the label on that tape to ensure the drive is ready\&.
566 .PP
567 On most systems, the library status check is nearly instantaneous \-\- the changer library provides its cached state to the host without initiating any robot motion\&. In order to keep its metadata up\-to\-date, chg\-robot runs this command very frequently, but this frequency can be reduced (at the cost of potentially stale metadata) by setting the STATUS\-INTERVAL property to a larger value\&.
568 .PP
569 Some tape libraries do not integrate the eject operation (performed by the embedded tape drive) with the unload operation (performed by the library robot), and can actually cause physical damage by attempting to remove the tape before the ejection is complete\&. For such changers, set the EJECT\-DELAY property to allow enough time for the eject to complete\&.
570 .PP
571 Once a tape is unloaded, if the library needs time to "quiesce" before processing another command, add that time to the UNLOAD\-DELAY parameter\&. No other operations will be performed on the library until this delay has elapsed\&.
572 .PP
573 Once a tape has been loaded, chg\-robot waits until the drive is ready before allowing Amanda to use the volume, as described for LOAD\-POLL, above\&.
574 .PP
575 Each of the times specified in these properties may be given as integers with the optional suffix
576 \fBs\fR
577 for seconds (the default) or
578 \fBm\fR
579 for minutes\&.
580 .SS "chg\-ndmp:HOST[:PORT]@SCSIDEV"
581 .nf
582     tpchanger "chg\-ndmp:filer\&.company\&.com@/dev/sg0"
583     property        "tape\-device" "0=ndmp:filer\&.company\&.com@/dev/rtape0"
584     property append "tape\-device" "1=ndmp:filer\&.company\&.com@/dev/rtape1"
585     property "use\-slots" "1\-12"
586     property "ndmp\-auth" "text"
587     property "ndmp\-username" "luke"
588     property "ndmp\-password" "leia"
589 .fi
590 .PP
591 This changer is very similar to
592 \fBchg\-robot\fR, but controls a tape changer on an NDMP server instead of a local device\&. The
593 \fBHOST\fR
594 in the
595 \fBtpchanger\fR
596 should be the hostname of the NDMP server\&. The
597 \fBPORT\fR
598 is optional\&. The
599 \fBSCSIDEV\fR
600 should specify the SCSI device on the NDMP server which controls the changer\&. The format of this parameter is implementation\-specific\&.
601 .PP
602 The appropriate authentication properties will be automatically set on any devices created by this changer\&.
603 .SS "Properties"
604 .PP
605 This changer supports all of the properties supported by
606 \fBchg\-robot\fR, although the value of
607 \fBMTX\fR
608 is ignored\&. The following properties are also recognized:
609 .PP
610 NDMP_AUTH
611 .RS 4
612
613 Authentication method to use to connect to the NDMP server\&.  One of
614 "md5" (default), "text", "none" (for an empty authentication attempt) or "void" (for
615 no authentication attempt at all)\&.
616 .RE
617 .PP
618 NDMP\-PASSWORD
619 .RS 4
620
621 The password for the NDMP server\&.
622 .RE
623 .PP
624 NDMP\-USERNAME
625 .RS 4
626
627 The username for the NDMP server\&.
628 .RE
629 .PP
630 VERBOSE
631 .RS 4
632
633 If true, enables the NDMJOB library\'s verbose (packet\-level) debugging\&.
634 .RE
635 .SS "Unmaintained Changers"
636 .PP
637 Amanda has many other changer scripts and programs beyond those described here (see the
638 changer\-src/
639 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\&.
640 .SH "SEE ALSO"
641 .PP
642 \fBamanda\fR(8),
643 \fBamanda.conf\fR(5),
644 \fBamanda-devices\fR(7)
645 .PP
646 The Amanda Wiki:
647 : http://wiki.zmanda.com/
648 .SH "AUTHOR"
649 .PP
650 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
651 .RS 4
652 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
653 .RE