.\" Title: amanda-changers .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.74.0 .\" Date: 01/22/2009 .\" Manual: Miscellanea .\" Source: Amanda 2.6.1 .\" Language: English .\" .TH "AMANDA\-CHANGERS" "7" "01/22/2009" "Amanda 2\&.6\&.1" "Miscellanea" .\" ----------------------------------------------------------------- .\" * (re)Define some macros .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" toupper - uppercase a string (locale-aware) .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de toupper .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ \\$* .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz .. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" SH-xref - format a cross-reference to an SH section .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de SH-xref .ie n \{\ .\} .toupper \\$* .el \{\ \\$* .\} .. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" SH - level-one heading that works better for non-TTY output .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de1 SH .\" put an extra blank line of space above the head in non-TTY output .if t \{\ .sp 1 .\} .sp \\n[PD]u .nr an-level 1 .set-an-margin .nr an-prevailing-indent \\n[IN] .fi .in \\n[an-margin]u .ti 0 .HTML-TAG ".NH \\n[an-level]" .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 \." make the size of the head bigger .ps +3 .ft B .ne (2v + 1u) .ie n \{\ .\" if n (TTY output), use uppercase .toupper \\$* .\} .el \{\ .nr an-break-flag 0 .\" if not n (not TTY), use normal case (not uppercase) \\$1 .in \\n[an-margin]u .ti 0 .\" if not n (not TTY), put a border/line under subheading .sp -.6 \l'\n(.lu' .\} .. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" SS - level-two heading that works better for non-TTY output .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de1 SS .sp \\n[PD]u .nr an-level 1 .set-an-margin .nr an-prevailing-indent \\n[IN] .fi .in \\n[IN]u .ti \\n[SN]u .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .ps \\n[PS-SS]u \." make the size of the head bigger .ps +2 .ft B .ne (2v + 1u) .if \\n[.$] \&\\$* .. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" BB/BE - put background/screen (filled box) around block of text .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de BB .if t \{\ .sp -.5 .br .in +2n .ll -2n .gcolor red .di BX .\} .. .de EB .if t \{\ .if "\\$2"adjust-for-leading-newline" \{\ .sp -1 .\} .br .di .in .ll .gcolor .nr BW \\n(.lu-\\n(.i .nr BH \\n(dn+.5v .ne \\n(BHu+.5v .ie "\\$2"adjust-for-leading-newline" \{\ \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] .\} .el \{\ \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] .\} .in 0 .sp -.5v .nf .BX .in .sp .5v .fi .\} .. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" BM/EM - put colored marker in margin next to block of text .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .de BM .if t \{\ .br .ll -2n .gcolor red .di BX .\} .. .de EM .if t \{\ .br .di .ll .gcolor .nr BH \\n(dn .ne \\n(BHu \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] .in 0 .nf .BX .in .fi .\} .. .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "Name" amanda-changers \- Configuring and Using Amanda Changers .SH "DESCRIPTION" .PP 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 \fIuser\-level\fR 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\&. .SH "TRANSITION" .PP 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 \fBamvault\fR(8)\&. .SH "SPECIFYING CHANGERS" .PP Changer specifications are strings like \FCchg\-disk:/my/vtapes\F[]\&. The \FCchg\-\F[] prefix serves to differentiate changers from devices (see \fBamanda-devices\fR(7))\&. The next portion (\FCdisk\F[], in this case) identifies the particular changer driver to use, and everything that follows the \FC:\F[] is interpreted by the driver\&. .PP A name which does not match this pattern, but which matches an old changer script (e\&.g\&., \FCchg\-zd\-mtx\F[]), invokes the backward\-compatibility changer driver as \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\&., \FCchg\-single:tape:/dev/rmt/0\F[]\&. .PP Changers which require additional parameters can also be described in \fBamanda.conf\fR(5) with "changer" sections, for example, .sp .nf define changer hp\-robot { tapedev "chg\-robot:/dev/sg1" property "drives" "0=/dev/nst0;1=/dev/nst0" property "slots" "1\-10" } .fi (note that "chg\-robot" is not yet implemented, so this is hypothetical)\&. A changer defininition creates a changer "alias", in this case named \fIhp\-robot\fR, which can then be named where an application expects a changer \- for example, the target of the \fBamvault\fR command\&. .SH "CHANGER DRIVERS" .PP 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\&. .SS "chg\-disk (new)" .nf tpchanger "chg\-disk:/u01/vtapes" .fi .PP This changer driver replaces the old \fBchg\-disk\fR, supporting parallel access to vtapes stored in directories named \FCslotN\F[] in the directory specified after \FCchg\-disk:\F[]\&. It does so by creating numbered "drives" so that simultaneous processes can access distinct slots\&. .SS "chg\-disk (old)" .nf tapedev "file:/u01/vtapes" tpchanger "chg\-disk" .fi .PP This changer script supports sequential access to vtapes stored in directories named \FCslotN\F[] in the directory specified by the \fItapedev\fR parameter\&. .SS "chg\-multi" .nf tpchanger "chg\-multi" changerfile "chg\-multi\-state" .fi .PP 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 \fIchangerfile\fR need not exist; it is used as a prefix for filenames of state files\&. .SS "chg\-manual" .nf tpchanger "chg\-manual" changerfile "chg\-manual\&.conf" .fi .PP 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): .sp .nf resend_mail=900 # resend mail every __ seconds timeout_mail=604800 # time out after this many seconds (default 7 days) request="[type]" # How to request a new tape (default "tty_email") request="tty" # Use the tty to ask the user to change tape\&. # Can\'t be use by cron request="email" # Send an email to ask the user to change tape\&. request="tty_email" # Use the tty if it exist or send an email\&. .fi .SS "chg\-zd\-mtx" .nf tpchanger "chg\-zd\-mtx" changerdev "/dev/sg0" # used with \'mtx \-f\' changerfile "chg\-zd\-mtx\&.conf" tapedev "tape:/dev/nst0" .fi .PP 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 \fB\-f\fR option and has subcommands like \fBstatus\fR\&. The configuration file parameters are (as listed in the script itself): .sp .nf firstslot=? #### First storage slot (element) lastslot=? #### Last storage slot (element) cleanslot=\-1 #### Slot with cleaner tape \-\- default is "\-1" #### Set negative to indicate no cleaner available driveslot=0 #### Drive slot number\&. Defaults to 0 #### Use the \'Data Transfer Element\' you want autoclean=0 #### Set to \'1\' or greater to enable autocleancount=99 #### Number of access before a clean\&. havereader=0 #### If you have a barcode reader, set to 1\&. offline_before_unload=0 #### Does your robot require an #### \'mt offline\' before mtx unload? poll_drive_ready=NN #### Time (seconds) between tests to see if #### the tape drive has gone ready (default: 3)\&. max_drive_wait=NN #### Maximum time (seconds) to wait for the #### tape drive to become ready (default: 120)\&. initial_poll_delay=NN #### initial delay after load before polling for #### readiness slotinfofile=FILENAME #### record slot information to this file, in #### the line\-based format "SLOT LABEL\en" .fi .SS "chg\-rait" .nf tpchanger "chg\-rait" changerfile "chg\-rait\&.conf" .fi .PP This changer script constructs RAIT devices out of the devices provided by several "sub\-changers"\&. The configuration file specifies \FCnchangers\F[], the number of subchangers, and then provides \FCtpchanger\F[], \FCchangerdev_N\F[], \FCchangerfile_N\F[], and \FCtpchanger_N\F[] for each sub\-changer, 1 through N\&. .SS "chg\-null" .nf tpchanger "chg\-null" .fi .PP This changer always provides the device "null:"\&. It is sometimes useful in conjunction with \fBchg\-rait\fR\&. .SS "Unmaintained Changers" .PP Amanda has many other changer scripts and programs beyond those described here (see the \FCchanger\-src/\F[] 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\&. .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBamanda-devices\fR(7), .SH "Author" .PP \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&> .RS 4 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[]) .RE