Imported Upstream version 3.2.0
[debian/amanda] / man / xml-source / amanda-devices.7.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM 'global.entities'>
7   %global_entities;
8 ]>
9
10 <refentry id='amanda-devices.7'>
11
12 <refmeta>
13 <refentrytitle>amanda-devices</refentrytitle>
14 <manvolnum>7</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.7;
18 </refmeta>
19 <refnamediv>
20 <refname>amanda-devices</refname>
21 <refpurpose>Configuring and Using Amanda Devices</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.ian;
25 &author.dustin;
26 </refentryinfo>
27 <!-- body begins here -->
28
29 <refsect1><title>DESCRIPTION</title>
30
31 <para>The Device API specifies a generic interface between Amanda and storage
32 devices such as tapes or disks.  This manual page describes the device
33 drivers included with Amanda.</para>
34
35 <para>This is a <emphasis>user-level</emphasis> description of the API, and
36 does not address details that are only of concern to developers.  For that
37 purpose, consult the Amanda source code and http://wiki.zmanda.com.</para>
38
39 <para>The term "device driver" describes the software that can communicate with
40 some kind of backend storage, e.g., a tape driver.  A "device" is the storage
41 element itself, usually a piece of hardware. When discussing a device and its
42 driver as a unit, the term  "device" is sometimes also used to refer to the
43 combination of device and driver.</para>
44
45
46 </refsect1>
47
48 <refsect1><title>SPECIFYING DEVICES</title>
49
50 <para>Device names take the form <emphasis>TYPE:NODE</emphasis>, where
51 <emphasis>TYPE</emphasis> selects a device driver, and
52 <emphasis>NODE</emphasis> provides further information to that driver.  The
53 syntax for each device driver is given in the corresponding section
54 below.</para>
55
56 <para>Devices can be described in &amconf; with "device" sections, e.g.,
57 <programlisting>
58 define device top_drive {
59     tapedev "tape:/dev/nst0"
60     device-property "BLOCK_SIZE" "131072"
61 }
62 </programlisting>
63 Such a device defininition creates a device "alias", in this case named
64 <emphasis>top_drive</emphasis>, which can then be named in the global
65 <emphasis>tapedev</emphasis> or <emphasis>tpchanger</emphasis> parameter:
66 <programlisting>
67 tapedev "top_drive"
68 </programlisting>
69 </para>
70
71 <para>The global <emphasis>tapedev</emphasis> parameter can also specify a
72 literal device name.  For example,
73 <programlisting>
74 tapedev "file:/amdisks"
75 </programlisting>
76 is equivalent to
77 <programlisting>
78 tapedev "default"
79 define device default {
80     tapedev "file:/amdisks"
81 }
82 </programlisting>
83 Note that, in both cases, the specified devices are actually accessed through
84 the <emphasis>chg-single</emphasis> changer driver; see <manref
85 name="amanda-changers" vol="7" /> for more information.  </para>
86
87 <para>Device properties specified outside of any device definition apply to
88 all devices.  This syntax is provided mainly for backward compatibility, and
89 for simple Amanda configurations.  Note that there is no way to provide
90 properties specific to a device without defining a device alias.</para>
91
92 <para>See <manref name="amanda-changers" vol="7" /> for details on how devices
93 are configured, and in particular on how device properties are specified.  See
94 <manref name="amanda.conf" vol="5"/> for more information on Amanda
95 configuration in general.</para>
96
97 <note><para>
98 There is no way to reset a device property to its default value.
99 </para></note>
100
101 </refsect1>
102
103 <refsect1><title>PROPERTIES</title>
104
105 <para>Device drivers use <emphasis>properties</emphasis> as a generic means to
106 interact with other parts of Amanda.  Some properties are set by the device
107 driver and used by Amanda to determine how its devices should be used.  Other
108 properties can be set by Amanda or by the user to influence the driver's
109 behavior. Properties are set for a particular device, so that if you have two
110 tape devices, they will not share property values.</para>
111
112 <para>Properties are specified in <emphasis>amanda.conf</emphasis> with the
113 <emphasis>device-property</emphasis> parameter.  The syntax looks like this:
114 <programlisting>
115 device-property "FROBNICATOR_PATH" "/var/frobd/state"
116 device-property "BYTES_PER_FORTNIGHT" "128k"
117 device-property "USE_QUBITS" "no"
118 </programlisting></para>
119
120 <para>Both the property name and the property value are always quoted.
121 Property names, like Amanda configuration parameters, are not
122 case-sensitive, and <literal>-</literal> (dash) and <literal>_</literal>
123 (underscore) may be used interchangeably.  String values are given as
124 simple strings, like FROBNICATOR_PATH in the example above.  Integer values
125 can be specified with any of the suffixes given in the "VALUE SUFFIXES"
126 section of &amconf;, like BYTES_PER_FORTNIGHT, above.  Boolean values can
127 be specified using the same names as in &amconf;, like USE_QUBITS, above.
128 Some properties have special formats, as described below.</para>
129
130 <para>Some properties are set based on other configuration values, such as
131 tapetype parameters.  These special cases are detailed under the appropriate
132 property, below.</para>
133
134 <para>The order in which device properties are set is as follows:
135 <orderedlist>
136 <listitem><para>Tapetype parameters (including length, blocksize, and readblocksize) are translated into device properties and set accordingly.</para></listitem>
137 <listitem><para>Device properties from any device-property
138     configuration parameters are set, in the order they appear in the
139     configuration file.</para>
140 </listitem>
141 </orderedlist></para>
142
143 <para>Properties described as read-only are not accessible to users.  They are
144 listed here for completeness.</para>
145
146 <refsect2><title>COMMON PROPERTIES</title>
147
148 <para>Note that some of these properties are currently unused, and present only
149 for future expansion.  Not all devices implement all of these properties.</para>
150
151 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
152
153 <variablelist>
154  <!-- ==== -->
155  <varlistentry><term>APPENDABLE</term><listitem>
156  (read-only) This boolean property indicates whether this device supports appending data to volumes.
157 </listitem></varlistentry>
158  <!-- ==== -->
159  <varlistentry><term>BLOCK_SIZE</term><listitem>
160  (read-write) This property gives the block size, in bytes, that will be used to write to the device.  The usual suffixes ("kbytes", etc.) are allowed.  The tapetype parameter <emphasis>blocksize</emphasis> sets this property.
161 </listitem></varlistentry>
162  <!-- ==== -->
163  <varlistentry><term>CANONICAL_NAME</term><listitem>
164  (read-only) This property contains the full canonical name for this device.  This name may not be the same as the user-supplied name, but is a valid name by which to access this device.
165 </listitem></varlistentry>
166  <!-- ==== -->
167  <varlistentry><term>COMMENT</term><listitem>
168  (read-write) This string property is entirely for the user's convenience.  It is supported by all devices, but no device interprets its value in any way.
169 </listitem></varlistentry>
170  <!-- ==== -->
171  <varlistentry><term>COMPRESSION</term><listitem>
172  (read-write) This boolean property represents the compression status of the device, and can be used to enable and disable such compression.  This applies mostly to tape devices, although many tape devices do not support setting compression from software.
173 </listitem></varlistentry>
174  <!-- ==== -->
175  <varlistentry><term>COMPRESSION_RATE</term><listitem>
176  (read-only) This property gives the compression rate, as a decimal ratio.  It may be a measured value over some unspecified period or a simple estimate.
177 </listitem></varlistentry>
178  <!-- ==== -->
179  <varlistentry><term>CONCURRENCY</term><listitem>
180  (read-only) This property indicates the level of concurrent access that this device supports.
181 </listitem></varlistentry>
182  <!-- ==== -->
183  <varlistentry><term>FULL_DELETION</term><listitem>
184  (read-only) This property indicates whether the device supports erasing the entire volume.  Aside from S3 and VFS, most devices cannot support this feature.
185 </listitem></varlistentry>
186  <!-- ==== -->
187  <varlistentry><term>LEOM</term><listitem>
188 (read-write) If this property is true, then the device can detect an EOM condition before actually running out of space, allowing Amanda to forgo caching parts while writing.  For some devices, it is necessary to override the conservative default value of this property.
189 </listitem></varlistentry>
190  <!-- ==== -->
191  <varlistentry><term>MAX_BLOCK_SIZE</term><listitem>
192  (read-only) This property gives the maximum block size this device can support.  See BLOCK SIZES, below.
193 </listitem></varlistentry>
194  <!-- ==== -->
195  <varlistentry><term>MEDIUM_ACCESS_TYPE</term><listitem>
196  (read-only) This property gives the type of the media in the device: read only, WORM (Write Once, Read Many), read/write, or write only.  Write-only devices do not support recovery, but the data are not necessarily thrown out.
197 </listitem></varlistentry>
198  <!-- ==== -->
199  <varlistentry><term>MIN_BLOCK_SIZE</term><listitem>
200  (read-write) This property gives the minimum block size this device can support.  See BLOCK SIZES, below.
201 </listitem></varlistentry>
202  <!-- ==== -->
203  <varlistentry><term>MAX_VOLUME_USAGE</term><listitem>
204  (read-write) On devices that support it, this property will limit the total amount of data written to a volume; attempts to write beyond this point will cause the device to simulate "out of space."  Zero means no limit.  The tapetype parameter <emphasis>length</emphasis> sets this property.
205 </listitem></varlistentry>
206  <!-- ==== -->
207  <varlistentry><term>PARTIAL_DELETION</term><listitem>
208  (read-only) This property indicates whether the device supports deletion of specific files.  Aside from linear tapes and S3, most devices can support this feature.  It is currently unused by Amanda.
209 </listitem></varlistentry>
210  <!-- ==== -->
211  <varlistentry><term>STREAMING</term><listitem>
212 (read-only) This property gives the streaming requirement for this device.  For
213 example, tape drives often require a steady supply of data to avoid
214 shoe-shining, while disk devices have no such requirement.  Streaming is
215 accomplished by buffering <amkeyword>device-output-buffer-size</amkeyword> bytes of
216 data.  The allowed values are "none" (no streaming buffer necessary),
217 "required" (fill the buffer before starting to write), or "desired" (fill the
218 buffer before starting to write, and if the buffer becomes empty, stop writing
219 until it is completely full again).
220 </listitem></varlistentry>
221  <!-- ==== -->
222  <varlistentry><term>VERBOSE</term><listitem>
223  (read-write) If this boolean property is set, then the device will produce verbose debugging output.  This property is not recognized by most devices.
224 </listitem></varlistentry>
225  <!-- ==== -->
226 </variablelist>
227
228 <refsect3><title>BLOCK SIZES</title>
229
230 <para>Amanda writes device data in blocks. On most devices the block
231 boundaries are embedded in the media along with the data itself, so subsequent
232 reads must use the same block sizes.  On tape devices, the block size is
233 dictated by the capabilities of the hardware -- buffer sizes, physical format,
234 and so on.</para>
235
236 <para>Amanda has historically supported a single, fixed block size -- usually
237 32k.  The Device API adds the ability to specify a block size at runtime, using
238 the BLOCK_SIZE property.  Devices provide MIN_BLOCK_SIZE and MAX_BLOCK_SIZE as
239 a guide to the range of acceptable block sizes. Note that this does not imply
240 that all sizes in the range MIN_BLOCK_SIZE - MAX_BLOCK_SIZE are available --
241 the device may require that block sizes are even multiples of some power of
242 two, for example.  Consult the documentation for your hardware and operating
243 system for more information.</para>
244
245 <para>Most devices are flexible enough to read a volume using a different block
246 size than that with which it was written.  This can be useful when handling old
247 volumes written with a smaller blocksize, or volumes of unknown blocksize.
248 Unfortunately, some tape devices do not detect oversized blocks correctly, and
249 may lose data if the configured block size is smaller than the volume's block
250 size.  The tape device driver has a READ_BLOCK_SIZE property which specifies
251 the minimum buffer size that will be allocated for reads from tape.  If the
252 hardware supports it, setting this property allows Amanda to correctly read
253 from tapes written with any blocksize less than or equal to READ_BLOCK_SIZE.</para>
254
255 <note><para>The RAIT device does not support flexible block sizes, as its
256 parity algorithm requires that all child devices have the same, fixed block
257 size.</para></note>
258
259 </refsect3>
260
261 <refsect3><title>LEOM DETECTION</title>
262
263 <para>Some Amanda devices can detect end-of-medium (running out of space on the
264 device) before it occurs.  This early warning is referred to as logical EOM,
265 and where it is supported Amanda can operate more efficiently, since the
266 possibility for data loss is reduced.</para>
267
268 <para>The boolean LEOM property indicates whether or not a particular device
269 supports LEOM detection.  The sections below also describe the degree of
270 support.</para>
271
272 </refsect3>
273
274 </refsect2>
275
276 </refsect1>
277
278 <refsect1><title>DEVICES</title>
279
280 <para>This section lists the device drivers included with Amanda, and basic instructions for using them.  For complete How-To information, consult the Amanda wiki at http://wiki.zmanda.com.</para>
281
282 <refsect2><title>Null Device</title>
283 <programlisting>
284 tapedev "null:"
285 </programlisting>
286
287 <para>The null device driver only supports writing, and discards all data.  It is
288 generally only useful for testing purposes.</para>
289
290 </refsect2>
291
292 <refsect2><title>RAIT Device</title>
293 <programlisting>
294 tapedev "rait:tape:/dev/rmt/tps0d{4,5,6}n"
295 </programlisting>
296
297 <para>The RAIT device driver mirrors or stripes data over multiple "child"
298 devices.  The child devices are specified using a shell-like syntax, where
299 alternatives are enclosed in braces and separated by commas.  Braces and commas
300 can be escaped with a backslash.  Note that the backslash itself must be
301 escaped in most contexts.  For example:
302 <programlisting>
303 tapedev "rait:{file:/var/amanda/vtapes,tape:/dev/nst0}"
304 tapedev "rait:{comma-dev:foo\\,bar,brace-dev:foo\\}bar}" # quoting
305 </programlisting>
306 If the braces contain a numeric range separated with two dots, that range will
307 be filled in sequentially.  If the first number has a leading zero, then the results
308 will be zero-padded to the maximum length.  For example:
309 <programlisting>
310 tapedev "rait:file:/var/amanda/vtapes/drive{01..04}"
311 </programlisting>
312 </para>
313
314 <para>With two child devices, the RAIT device driver mirrors data such that the
315 two devices contain identical data and can be used singly for
316   recovery.  With more than two devices, the RAIT device "stripes"
317   data across all but one device and writes a parity block to the
318   final device, usable for data recovery in the event of a device or
319   volume failure.  The RAIT device scales its blocksize as necessary
320   to match the number of children that will be used to store data.</para>
321
322 <para>When a child device is known to have failed, the RAIT device should be reconfigured to replace that device with the text "ERROR", e.g.,
323 <programlisting>
324 tapedev "rait:{tape:/dev/st0,ERROR,tape:/dev/st2}"
325 </programlisting>
326 This will cause the RAIT device to start up in degraded mode, reconstructing the data from the missing device.
327 </para>
328
329 <para>Like ordinary RAID drivers, the RAIT device driver can automatically
330 enter degraded mode when one of its child devices fails.  However, the RAIT
331 device cannot automatically recover from any write error nor write any data in
332 degraded mode.  When reading, certain errors may be fatal (rather than causing
333 degraded mode).  And in any case, labels on all volumes must initially match
334 (labeled or otherwise).  If you have lost one volume from a set, explicitly
335 start the device in degraded mode as described above.</para>
336
337 <para>This device can detect LEOM if and only if all of the child devices can detect LEOM.</para>
338
339 <refsect3><title>Child Device Block Sizes</title>
340
341 <para>The RAIT device driver requires that all of its child devices use the
342 same block size.  If no block sizes are specified, the driver selects the block
343 size closest to 32k that is within the MIN_BLOCK_SIZE - MAX_BLOCK_SIZE range of
344 all child devices, and calculates its own blocksize according to the formula
345 <emphasis>rait_blocksize = child_blocksize * (num_children - 1)</emphasis>.  If
346 a block size is specified for the RAIT device, then it calculates its child
347 block sizes according to the formula <emphasis>child_blocksize = rait_blocksize
348 / (num_children - 1)</emphasis>.  Either way, it sets the BLOCK_SIZE property
349 of each child device accordingly.</para>
350
351 </refsect3>
352
353 </refsect2>
354
355 <refsect2><title>S3 Device</title>
356 <programlisting>
357 tapedev "s3:foocorp-backups/DailySet1-"
358 device-property "S3_ACCESS_KEY" "MYACCESSKEY"
359 device-property "S3_SECRET_KEY" "MYSECRETKEY"
360 </programlisting>
361
362 <para>The S3 device driver uploads data to the Amazon S3 "storage cloud".  Its
363 device name is a slash-sparated combination of bucket name and prefix:
364 "s3:BUCKET/PREFIX".  Since buckets must be unique across all Amazon S3 users,
365 and since the number of buckets allowed to each user is limited, the driver can
366 store multiple Amanda volumes in a single S3 bucket, distinguished by prefix.
367 The prefix and slash can be omitted if they are not needed: "s3:BUCKET".</para>
368
369 <para>The access and secret keys used to authenticate to Amazon S3 are provided
370 as properties.</para>
371
372 <para>The S3 device driver stores each block in a distinct S3 object.  Due to
373 high HTTP overhead for each request, use of larger than normal block
374   sizes (&gt; 1 megabyte) is reccomended with the S3 device.</para>
375
376 <para>
377 Amanda automatically creates a bucket when writing, if the bucket doesn't
378 already exist. At that time, it specifies where Amazon should store the data
379 based on the S3_BUCKET_LOCATION property. If this property is not set,
380 Amazon's default value (equivalent to "*") is used. The bucket location has both billing and
381 legal concerns, so you are encouraged to consult Amazon's documentation for details.
382 </para>
383
384 <para>
385 Amazon does not permit changes to bucket locations, so this is a permanent
386 specification. If the bucket already exists and the property is set,
387 then Amanda checks the property against the location of the bucket, and
388 produces an error if they do not match.
389 </para>
390
391 <note><para>
392 If a location constraint is set, the bucket name must consist only of
393 lower-case letters, numbers, dashes, and dots.
394 </para></note>
395
396 <para>This driver supports the VERBOSE property, but use it carefully -- it
397 produces a great deal of output, and may cause spurious failures by filling
398 your debug log partition.  Its logging is generally only useful for developers
399 chasing down a problem in communications with Amazon's servers.</para>
400
401 <para>Since Amazon storage is unlimited, the device never encounteres EOM, so
402 LEOM detection is trivially enabled for this device.</para>
403
404 <refsect3><title>Device-Specific Properties</title>
405
406 <para>In addition to the common properties, the S3 device supports the
407 properties listed in this section.</para>
408
409 <para>Most Amanda devices work just fine without any properties, but not the S3
410 device.  A typical S3 configuration will have an access key and secret key
411 specified:
412
413 <programlisting>
414 device-property "S3_ACCESS_KEY" "27D3B8C6C4E7AA423C2B37C72A0D22C8"
415 device-property "S3_SECRET_KEY" "agphc2Q7Zmxragphc2RmO2xragpzZGY7a2xqCgr"
416 </programlisting></para>
417
418 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
419 <variablelist>
420  <!-- ==== -->
421  <varlistentry><term>MAX_RECV_SPEED</term><listitem>
422 (read-write) Maximum speed, in bytes per second, that this device will receive
423 data from S3.  If the average speed exceeds this value, the device will stop
424 reading long enough to bring the average below this value.
425 </listitem></varlistentry>
426  <!-- ==== -->
427  <varlistentry><term>MAX_SEND_SPEED</term><listitem>
428 (read-write) Maximum speed, in bytes per second, that this device will send
429 data to S3.  If the average speed exceeds this value, the device will stop
430 writing long enough to bring the average below this value.
431 </listitem></varlistentry>
432  <!-- ==== -->
433  <varlistentry><term>S3_ACCESS_KEY</term><listitem>
434  (read-write) This property gives the Amazon S3 access key used to access the service.
435 </listitem></varlistentry>
436  <!-- ==== -->
437  <varlistentry><term>S3_BUCKET_LOCATION</term><listitem>
438  (read-write) Location constraint for buckets on Amazon S3.
439 As of this writing, it can be set to "*" (US Standard, i.e. lowest-latency
440 choice of US East or West), "us-west-1" (US West, Northern California), "EU"
441 (European Union), or "ap-southeast-1" (Asia Pacific).  See <ulink
442 url="http://docs.amazonwebservices.com/AmazonS3/latest/index.html?LocationSelection.html"
443 /> for the most up-to-date list.
444 </listitem></varlistentry>
445  <!-- ==== -->
446  <varlistentry><term>SSL_CA_INFO</term><listitem>
447  (read-write) Path to CA certificate to use to verify the identity of the S3 server.
448 Only applicable when SSL/TLS is in use. The certificate should be in PEM format
449 if OpenSSL or GnuTLS is being used with libcurl. Multiple certificates can be
450 bundled together simply by concatenating them.
451 If NSS is being used, then it is the directory that the database resides in.
452 The value is passed to curl_easy_setopt(3) as CURLOPT_CAINFO.
453 </listitem></varlistentry>
454  <!-- ==== -->
455  <varlistentry><term>S3_SECRET_KEY</term><listitem>
456  (read-write) This property gives the Amazon S3 secret key used to access the service.
457 </listitem></varlistentry>
458  <!-- ==== -->
459  <varlistentry><term>S3_STORAGE_CLASS</term><listitem>
460 (read-write) Storage class for new objects, currently one of "STANDARD" (the default)
461 or "REDUCED_REDUNDANCY" (cheaper, but less redundant).  See
462 <ulink url="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?DataDurability.html" />
463 for the most up-to-date list.
464 </listitem></varlistentry>
465  <!-- ==== -->
466  <varlistentry><term>S3_SSL</term><listitem>
467  (read-write) Whether or not to use SSL/TLS to secure communications with Amazon S3.
468 </listitem></varlistentry>
469  <!-- ==== -->
470  <varlistentry><term>S3_USER_TOKEN</term><listitem>
471  (read-write) This property specifies the user token for Amanda Enterprise Edition customers.
472 </listitem></varlistentry>
473  <!-- ==== -->
474  <varlistentry><term>VERBOSE</term><listitem>
475  (read-write) If true, verbose data about each HTTP transaction is sent to the debug log.
476 </listitem></varlistentry>
477  <!-- ==== -->
478 </variablelist>
479
480 </refsect3>
481
482 </refsect2>
483
484 <refsect2><title>Tape Device</title>
485 <programlisting>
486 tapedev "tape:/dev/nst0"
487 </programlisting>
488
489 <para>The tape device driver interacts with a tape drive.  The device uses the
490 operating system's built-in tape support, which is generally similar to that
491 available via the command-line utilities dd(1) and mt(1).</para>
492
493 <para>The tape device name should specify a path to the operating system's
494 device file.</para>
495
496 <para>There is no simple way to determine whether a particular system
497 (operating system and tape hardware) supports LEOM, so as a safe default
498 the tape device has LEOM detection disabled.  However, on modern hardware
499 and common operating systems (Linux, *BSD, and Solaris, at least), LEOM
500 support is functional.  On these systems, enable LEOM by setting the LEOM
501 property to "true" at the appropriate place in the Amanda
502 configuration.</para>
503
504 <refsect3><title>Device-Specific Properties</title>
505
506 <para>Most of these properties are automatically detected, but can be
507 overridden in the configuration file if the autodetection fails. Note that tape
508 drives are required to at least support the MTREW (rewind) operation; all other
509 operations can be emulated with the MTREW and read data operations.</para>
510
511 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
512 <variablelist>
513  <!-- ==== -->
514  <varlistentry><term>BROKEN_GMT_ONLINE</term><listitem>
515  (read-write) Set this boolean property if the system's GMT_ONLINE macro gives incorrect results.  This is currently true for the Linux IDE-TAPE driver.
516 </listitem></varlistentry>
517  <!-- ==== -->
518  <varlistentry><term>BSF</term><listitem>
519  (read-write) This boolean property specifies whether the device
520  driver may execute the MTBSF operation (backward seek file).
521 </listitem></varlistentry>
522  <!-- ==== -->
523  <varlistentry><term>BSF_AFTER_EOM</term><listitem>
524  (read-write) This boolean property specifies whether the device
525  driver should execute an MTBSF (backward seek file) operation after
526  MTEOM (seek to end of recorded data) in order to append.
527 </listitem></varlistentry>
528  <!-- ==== -->
529  <varlistentry><term>BSR</term><listitem>
530  (read-write) This boolean property specifies whether the device
531  driver may use the MTBSR operation (backward seek record).
532 </listitem></varlistentry>
533  <!-- ==== -->
534  <varlistentry><term>EOM</term><listitem>
535  (read-write) This boolean property specifies whether the device
536  driver may use the MTEOM command (seek to end of recorded data).
537 </listitem></varlistentry>
538  <!-- ==== -->
539  <varlistentry><term>FINAL_FILEMARKS</term><listitem>
540  (read-write) This integer property gives the number of filemarks that should be written at EOD.  It is usually 1 or 2.
541 </listitem></varlistentry>
542  <!-- ==== -->
543  <varlistentry><term>FSF</term><listitem>
544  (read-write) This boolean property specifies whether the device driver may use the MTFSF operation (forward seek file).
545 </listitem></varlistentry>
546  <!-- ==== -->
547  <varlistentry><term>FSF_AFTER_FILEMARK</term><listitem>
548  (read-write) This boolean property specifies whether the device driver needs a FSF to go the next file after the filemark is read. Default to "TRUE" on Solaris and "FALSE" on all others machines.
549 </listitem></varlistentry>
550  <!-- ==== -->
551  <varlistentry><term>FSR</term><listitem>
552  (read-write) This boolean property specifies whether the device driver may use the MTFSR operation (forward seek record).
553 </listitem></varlistentry>
554  <!-- ==== -->
555  <varlistentry><term>NONBLOCKING_OPEN</term><listitem>
556  (read-write) Set this boolean property to "true" if O_NONBLOCK must be used on the open call. Default to "true" on Linux and "false" on all others machines. Witout it, Linux wait for a few seconds if no tape are loaded. Solaris have strange error it is set to "yes".
557 </listitem></varlistentry>
558  <!-- ==== -->
559  <varlistentry><term>READ_BLOCK_SIZE</term><listitem>
560  (read-write) This property (previously known as <emphasis>READ_BUFFER_SIZE</emphasis>) specifies the block size that will be used for reads; this should be large enough to contain any block that may be read from the device (for example, from a tape containing variable-sized blocks), and must be larger than BLOCK_SIZE.  This property is most often used when overwriting tapes using a new, smaller block size.
561  The tapetype parameter <emphasis>READBLOCKSIZE</emphasis> sets this property.  See BLOCK SIZES, above.
562 </listitem></varlistentry>
563  <!-- ==== -->
564 </variablelist>
565
566 </refsect3>
567
568 </refsect2>
569
570 <refsect2><title>NDMP Device</title>
571 <programlisting>
572 tapedev "ndmp:my.filer.com:10000@st1"
573 device-property "NDMP_USERNAME" "jimmy"
574 device-property "NDMP_PASSWORD" "thelock"
575 </programlisting>
576
577 <para>This device enables Amanda to communicate with a tape service on an NDMP
578 server.  The device name specifies the hostname and optionally the TCP port of
579 the NDMP server, followed by the name of the tape device on the server
580 (<command>st1</command> in the example above).</para>
581
582 <para>This device supports LEOM detection.</para>
583
584 <refsect3><title>Device-Specific Properties</title>
585
586 <para>The properties <command>NDMP_USERNAME</command> and
587 <command>NDMP_PASSWORD</command> set the username and password with which to
588 access the NDMP server.  The default for both is "ndmp".</para>
589
590 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
591 <variablelist>
592  <!-- ==== -->
593 <varlistentry><term>NDMP_AUTH</term><listitem>
594 (read-write) Authentication method to use to connect to the NDMP server.  One of
595 "md5" (default), "text", "none" (for an empty authentication attempt) or "void" (for
596 no authentication attempt at all).
597 </listitem></varlistentry>
598  <!-- ==== -->
599 <varlistentry><term>NDMP_PASSWORD</term><listitem>
600 (read-write) Password for md5 or text authentications.
601 </listitem></varlistentry>
602  <!-- ==== -->
603 <varlistentry><term>NDMP_USERNAME</term><listitem>
604 (read-write) Username for md5 or text authentications.
605 </listitem></varlistentry>
606  <!-- ==== -->
607 <varlistentry><term>READ_BLOCK_SIZE</term><listitem>
608 (read-write) This property specifies the block size that will be used for reads; this should be large enough to contain any block that may be read from the device and must be larger than BLOCK_SIZE. See BLOCK_SIZES, above.
609 </listitem></varlistentry>
610  <!-- === -->
611 </variablelist>
612
613 </refsect3>
614
615 </refsect2>
616
617 <refsect2><title>VFS Device</title>
618 <programlisting>
619 tapedev "file:/path/to/vtape"
620 </programlisting>
621
622 <para>The VFS device driver stores data on a UNIX filesystem. Note
623   that although one typically uses the VFS device driver to store data
624   on hard disks, the driver does not interface with any hardware on a
625   block level.</para>
626
627 <para>The device name specifies a path to a directory which must exist and
628 contain a "data/" subdirectory.  Each tape file is stored as a distinct file in
629 this directory, the name of which reflects the Amanda header in the tape file.
630 Block boundaries are not maintained: the driver supports reads of arbitrary
631 size, regardless of the blocksize used to write the data.</para>
632
633 <para>This device supports LEOM detection.  LEOM will be indicated when the
634     MAX_VOLUME_USAGE is nearly met, or when the filesystem is nearly out of
635     space.  The latter circumstance is detected by monitoring the available
636     space on the filesystem, and this monitoring can be disabled with the
637     MONITOR_FREE_SPACE property.  Note that the device cannot detect other
638     circumstances that may cause a write to fail, such as a filesystem quota.
639     LEOM detection can be disabled by setting the LEOM property to
640     false.</para>
641
642 <refsect3><title>Device-Specific Properties</title>
643
644 <variablelist>
645  <varlistentry><term>MONITOR_FREE_SPACE</term><listitem>
646          (read-write) This property controls whether the device will monitor
647          the filesystem's free space to detect a full filesystem before an
648          error occurs, and defaults to true.  The monitoring operation works on
649          most filesystems, but if it causes problems, use this property to
650          disable it.
651 </listitem></varlistentry>
652 </variablelist>
653
654 </refsect3>
655
656 </refsect2>
657
658 <refsect2><title>DVD-RW Device</title>
659 <programlisting>
660 tapedev "dvdrw:/var/cache/amanda/dvd-cache:/dev/scd0"
661 device-property "DVDRW_MOUNT_POINT" "/media/dvd"
662 device-property "DVDRW_KEEP_CACHE" "false"
663 device-property "DVDRW_UNLABELLED_WHEN_UNMOUNTABLE" "true"
664 </programlisting>
665
666 <para>The DVD-RW device driver reads and writes optical media such as DVDs and
667 CDs. The device name must specify a cache directory for data to be temporarily
668 stored, followed by the operating system name for the optical drive. The cache
669 directory must contain a "data/" subdirectory.</para>
670
671 <para>The DVDRW_MOUNT_POINT property is required, and specifies a directory
672 where the optical media can be mounted. This directory must be configured to
673 enable non-root users to mount the optical media. On Linux, that means a line
674 similar to the following in /etc/fstab:</para>
675 <programlisting>
676 /dev/scd0 /media/dvd auto ro,user,noauto 0 0
677 </programlisting>
678
679 <para>Note the "user" option.</para>
680
681 <para>When writing data, the device acts as a VFS device using the given cache
682 directory. On completion of writing the tape, the cache directory is written
683 to optical media. The DVDRW_KEEP_CACHE property controls whether the cache
684 contents are immediately deleted. When reading, the optical media is first
685 mounted and read as a VFS device.</para>
686
687 <para>Attempting to mount unformatted media or media that is formatted but
688 contains no filesystem will usually result in an error. The boolean
689 DVDRW_UNLABELLED_WHEN_UNMOUNTABLE property specifies whether media that cannot
690 be mounted should be treated as an empty, unlabelled volume when attempting to
691 read the volume label. It is necessary to set this property to "true" when
692 labelling such media.</para>
693
694 <para>This device does not support LEOM detection.</para>
695
696 <refsect3><title>Device-Specific Properties</title>
697
698 <para>The properties DVDRW_GROWISOFS_COMMAND, DVDRW_MOUNT_COMMAND and
699 DVDRW_UMOUNT_COMMAND specify alternative commands for writing, mounting and
700 unmounting optical media. The default is to find the programs using the PATH
701 environment variable.</para>
702
703 <para>The CDRW device supports all of the properties of the VFS device, as well
704     as the properties given below.  The DVDRW_MOUNT_POINT property is required.
705     Other properties are optional.</para>
706
707 <variablelist>
708  <varlistentry><term>DVDRW_KEEP_CACHE</term><listitem>
709  (read-write) Set this boolean property to "true" if the disk cache directory should be kept after successfully writing tape data to optical media. The default is false, which causes the cache contents to be deleted immediately after a successful write operation.
710 </listitem></varlistentry>
711  <varlistentry><term>DVDRW_MOUNT_POINT</term><listitem>
712  (read-write) This property specifies the filesystem mount point for the optical media. Non-root users must be able to mount optical media by invoking "mount" and specifying this mount point.
713 </listitem></varlistentry>
714  <varlistentry><term>DVDRW_UNLABELLED_WHEN_UNMOUNTABLE</term><listitem>
715  (read-write) Treat unmountable media as empty, unlabelled media. This is necessary when attempting to label freshly formatted media.
716 </listitem></varlistentry>
717  <varlistentry><term>DVDRW_GROWISOFS_COMMAND</term><listitem>
718  (read-write) The command to invoke to burn the DVD.
719 </listitem></varlistentry>
720  <varlistentry><term>DVDRW_MOUNT_COMMAND</term><listitem>
721  (read-write) The command to invoke to mount the DVD.
722 </listitem></varlistentry>
723  <varlistentry><term>DVDRW_UMOUNT_COMMAND</term><listitem>
724  (read-write) The command to invoke to unmount the DVD.
725 </listitem></varlistentry>
726 </variablelist>
727
728 </refsect3>
729
730 </refsect2>
731
732 </refsect1>
733
734 <seealso>
735 <manref name="amanda.conf" vol="5"/>,
736 </seealso>
737
738 </refentry>