a333440cde2673a9e87604b57d6447503f5cc1f0
[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>FREE_SPACE</term><listitem>
184  (read-only) This property gives the amount of free space available on the current volume, if known.  This is often an estimate; for example, tape devices can only estimate the amount of tape left on a spool.
185 </listitem></varlistentry>
186  <!-- ==== -->
187  <varlistentry><term>FULL_DELETION</term><listitem>
188  (read-only) This property indicates whether the device supports erasing the entire volume.  Aside from S3 and VFS, most devices cannot support this feature.
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 example, tape drives often require a steady supply of data to avoid shoe-shining, while disk devices have no such requirement.
213 </listitem></varlistentry>
214  <!-- ==== -->
215  <varlistentry><term>VERBOSE</term><listitem>
216  (read-write) If this boolean property is set, then the device will produce verbose debugging output.  This property is not recognized by most devices.
217 </listitem></varlistentry>
218  <!-- ==== -->
219 </variablelist>
220
221 <refsect3><title>BLOCK SIZES</title>
222
223 <para>Amanda writes device data in blocks. On most devices the block
224 boundaries are embedded in the media along with the data itself, so subsequent
225 reads must use the same block sizes.  On tape devices, the block size is
226 dictated by the capabilities of the hardware -- buffer sizes, physical format,
227 and so on.</para>
228
229 <para>Amanda has historically supported a single, fixed block size -- usually
230 32k.  The Device API adds the ability to specify a block size at runtime, using
231 the BLOCK_SIZE property.  Devices provide MIN_BLOCK_SIZE and MAX_BLOCK_SIZE as
232 a guide to the range of acceptable block sizes. Note that this does not imply
233 that all sizes in the range MIN_BLOCK_SIZE - MAX_BLOCK_SIZE are available --
234 the device may require that block sizes are even multiples of some power of
235 two, for example.  Consult the documentation for your hardware and operating
236 system for more information.</para>
237
238 <para>Most devices are flexible enough to read a volume using a different block
239 size than that with which it was written.  This can be useful when handling old
240 volumes written with a smaller blocksize, or volumes of unknown blocksize.
241 Unfortunately, some tape devices do not detect oversized blocks correctly, and
242 may lose data if the configured block size is smaller than the volume's block
243 size.  The tape device driver has a READ_BLOCK_SIZE property which specifies
244 the minimum buffer size that will be allocated for reads from tape.  If the
245 hardware supports it, setting this property allows Amanda to correctly read
246 from tapes written with any blocksize less than or equal to READ_BLOCK_SIZE.</para>
247
248 <note><para>The RAIT device does not support flexible block sizes, as its
249 parity algorithm requires that all child devices have the same, fixed block
250 size.</para></note>
251
252 </refsect3>
253
254 </refsect2>
255
256 </refsect1>
257
258 <refsect1><title>DEVICES</title>
259
260 <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>
261
262 <refsect2><title>Null Device</title>
263 <programlisting>
264 tapedev "null:"
265 </programlisting>
266
267 <para>The null device driver only supports writing, and discards all data.  It is
268 generally only useful for testing purposes.</para>
269
270 </refsect2>
271
272 <refsect2><title>RAIT Device</title>
273 <programlisting>
274 tapedev "rait:tape:/dev/rmt/tps0d{4,5,6}n"
275 </programlisting>
276
277 <para>The RAIT device driver mirrors or stripes data over multiple "child"
278 devices.  The child devices are specified using a shell-like syntax, where
279 alternatives are enclosed in braces and separated by commas.  Braces and commas
280 can be escaped with a backslash.  Note that the backslash itself must be
281 escaped in most contexts.  For example:
282 <programlisting>
283 tapedev "rait:{commandev:foo\\,bar,bracedev:foo\\}bar}"
284 </programlisting>
285 </para>
286
287 <para>With two child devices, the RAIT device driver mirrors data such that the
288 two devices contain identical data and can be used singly for
289   recovery.  With more than two devices, the RAIT device "stripes"
290   data across all but one device and writes a parity block to the
291   final device, usable for data recovery in the event of a device or
292   volume failure.  The RAIT device scales its blocksize as necessary
293   to match the number of children that will be used to store data.</para>
294
295 <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.,
296 <programlisting>
297 tapedev "rait:{tape:/dev/st0,ERROR,tape:/dev/st2}"
298 </programlisting>
299 This will cause the RAIT device to start up in degraded mode, reconstructing the data from the missing device.
300 </para>
301
302 <para>Like ordinary RAID drivers, the RAIT device driver can automatically
303 enter degraded mode when one of its child devices fails.  However, the RAIT
304 device cannot automatically recover from any write error nor write any data in
305 degraded mode.  When reading, certain errors may be fatal (rather than causing
306 degraded mode).  And in any case, labels on all volumes must initially match
307 (labeled or otherwise).  If you have lost one volume from a set, explicitly
308 start the device in degraded mode as described above.</para>
309
310 <refsect3><title>Child Device Block Sizes</title>
311
312 <para>The RAIT device driver requires that all of its child devices use the
313 same block size.  If no block sizes are specified, the driver selects the block
314 size closest to 32k that is within the MIN_BLOCK_SIZE - MAX_BLOCK_SIZE range of
315 all child devices, and calculates its own blocksize according to the formula
316 <emphasis>rait_blocksize = child_blocksize * (num_children - 1)</emphasis>.  If
317 a block size is specified for the RAIT device, then it calculates its child
318 block sizes according to the formula <emphasis>child_blocksize = rait_blocksize
319 / (num_children - 1)</emphasis>.  Either way, it sets the BLOCK_SIZE property
320 of each child device accordingly.</para>
321
322 </refsect3>
323
324 </refsect2>
325
326 <refsect2><title>S3 Device</title>
327 <programlisting>
328 tapedev "s3:foocorp-backups/DailySet1-"
329 device_property "S3_ACCESS_KEY" "MYACCESSKEY"
330 device_property "S3_SECRET_KEY" "MYSECRETKEY"
331 </programlisting>
332
333 <para>The S3 device driver uploads data to the Amazon S3 "storage cloud".  Its
334 device name is a slash-sparated combination of bucket name and prefix:
335 "s3:BUCKET/PREFIX".  Since buckets must be unique across all Amazon S3 users,
336 and since the number of buckets allowed to each user is limited, the driver can
337 store multiple Amanda volumes in a single S3 bucket, distinguished by prefix.
338 The prefix and slash can be omitted if they are not needed: "s3:BUCKET".</para>
339
340 <para>The access and secret keys used to authenticate to Amazon S3 are provided
341 as properties.</para>
342
343 <para>The S3 device driver stores each block in a distinct S3 object.  Due to
344 high HTTP overhead for each request, use of larger than normal block
345   sizes (&gt; 1 megabyte) is reccomended with the S3 device.</para>
346
347 <para>
348 Amanda automatically creates a bucket when writing, if the bucket doesn't
349 already exist. At that time, it specifies where Amazon should store the data
350 based on the S3_BUCKET_LOCATION property. Currently, there are two valid settings:
351 "*" (any location, probably US) and "EU" (Europe). If this property is not set,
352 Amazon's default value of "*" is used. The bucket location has both billing and
353 legal concerns, so you are encouraged to consult Amazon's documentation for details.
354 </para>
355
356 <para>
357 Amazon does not permit changes to bucket locations, so this is a permanent
358 specification. If the bucket already exists and the property is set,
359 then Amanda checks the property against the location of the bucket, and
360 produces an error if they do not match.
361 </para>
362
363 <note><para>
364 If a location constraint is set, the bucket name must consist only of
365 lower-case letters, numbers, dashes, and dots.
366 </para></note>
367
368 <para>This driver supports the VERBOSE property, but use it carefully -- it
369 produces a great deal of output, and may cause spurious failures by filling
370 your debug log partition.  Its logging is generally only useful for developers
371 chasing down a problem in communications with Amazon's servers.</para>
372
373 <refsect3><title>Device-Specific Properties</title>
374
375 <para>In addition to the common properties, the S3 device supports the
376 properties listed in this section.</para>
377
378 <para>Most Amanda devices work just fine without any properties, but not the S3
379 device.  A typical S3 configuration will have an access key and secret key
380 specified:
381
382 <programlisting>
383 device_property "S3_ACCESS_KEY" "27D3B8C6C4E7AA423C2B37C72A0D22C8"
384 device_property "S3_SECRET_KEY" "agphc2Q7Zmxragphc2RmO2xragpzZGY7a2xqCgr"
385 </programlisting></para>
386
387 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
388 <variablelist>
389  <!-- ==== -->
390  <varlistentry><term>MAX_RECV_SPEED</term><listitem>
391 (read-write) Maximum speed, in bytes per second, that this device will receive
392 data from S3.  If the average speed exceeds this value, the device will stop
393 reading long enough to bring the average below this value.
394 </listitem></varlistentry>
395  <!-- ==== -->
396  <varlistentry><term>MAX_SEND_SPEED</term><listitem>
397 (read-write) Maximum speed, in bytes per second, that this device will send
398 data to S3.  If the average speed exceeds this value, the device will stop
399 writing long enough to bring the average below this value.
400 </listitem></varlistentry>
401  <!-- ==== -->
402  <varlistentry><term>S3_ACCESS_KEY</term><listitem>
403  (read-write) This property gives the Amazon S3 access key used to access the service.
404 </listitem></varlistentry>
405  <!-- ==== -->
406  <varlistentry><term>S3_BUCKET_LOCATION</term><listitem>
407  (read-write) Location constraint for buckets on Amazon S3.
408 Currently, it can be set to "", for no constraint (i.e. store data in the US),
409 or "EU" (i.e. store data in the EU).
410 See Amazon's documentation for details and latest information
411 </listitem></varlistentry>
412  <!-- ==== -->
413  <varlistentry><term>SSL_CA_INFO</term><listitem>
414  (read-write) Path to CA certificate to use to verify the identity of the S3 server.
415 Only applicable when SSL/TLS is in use. The certificate should be in PEM format
416 if OpenSSL or GnuTLS is being used with libcurl. Multiple certificates can be
417 bundled together simply by concatenating them.
418 If NSS is being used, then it is the directory that the database resides in.
419 The value is passed to curl_easy_setopt(3) as CURLOPT_CAINFO.
420 </listitem></varlistentry>
421  <!-- ==== -->
422  <varlistentry><term>S3_SECRET_KEY</term><listitem>
423  (read-write) This property gives the Amazon S3 secret key used to access the service.
424 </listitem></varlistentry>
425  <!-- ==== -->
426  <varlistentry><term>S3_SSL</term><listitem>
427  (read-write) Whether or not to use SSL/TLS to secure communications with Amazon S3.
428 </listitem></varlistentry>
429  <!-- ==== -->
430  <varlistentry><term>S3_USER_TOKEN</term><listitem>
431  (read-write) This property specifies the user token for Amanda Enterprise Edition customers.
432 </listitem></varlistentry>
433  <!-- ==== -->
434  <varlistentry><term>VERBOSE</term><listitem>
435  (read-write) If true, verbose data about each HTTP transaction is sent to the debug log.
436 </listitem></varlistentry>
437  <!-- ==== -->
438 </variablelist>
439
440 </refsect3>
441
442 </refsect2>
443
444 <refsect2><title>Tape Device</title>
445 <programlisting>
446 tapedev "tape:/dev/nst0"
447 </programlisting>
448
449 <para>The tape device driver interacts with a tape drive.  The device uses the
450 operating system's built-in tape support, which is generally similar to that
451 available via the command-line utilities dd(1) and mt(1).</para>
452
453 <para>The tape device name should specify a path to the operating system's
454 device file.</para>
455
456 <refsect3><title>Device-Specific Properties</title>
457
458 <para>Most of these properties are automatically detected, but can be
459 overridden in the configuration file if the autodetection fails. Note that tape
460 drives are required to at least support the MTREW (rewind) operation; all other
461 operations can be emulated with the MTREW and read data operations.</para>
462
463 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
464 <variablelist>
465  <!-- ==== -->
466  <varlistentry><term>BROKEN_GMT_ONLINE</term><listitem>
467  (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.
468 </listitem></varlistentry>
469  <!-- ==== -->
470  <varlistentry><term>BSF</term><listitem>
471  (read-write) This boolean property specifies whether the device
472  driver may execute the MTBSF operation (backward seek file).
473 </listitem></varlistentry>
474  <!-- ==== -->
475  <varlistentry><term>BSF_AFTER_EOM</term><listitem>
476  (read-write) This boolean property specifies whether the device
477  driver should execute an MTBSF (backward seek file) operation after
478  MTEOM (seek to end of recorded data) in order to append.
479 </listitem></varlistentry>
480  <!-- ==== -->
481  <varlistentry><term>BSR</term><listitem>
482  (read-write) This boolean property specifies whether the device
483  driver may use the MTBSR operation (backward seek record).
484 </listitem></varlistentry>
485  <!-- ==== -->
486  <varlistentry><term>EOM</term><listitem>
487  (read-write) This boolean property specifies whether the device
488  driver may use the MTEOM command (seek to end of recorded data).
489 </listitem></varlistentry>
490  <!-- ==== -->
491  <varlistentry><term>FINAL_FILEMARKS</term><listitem>
492  (read-write) This integer property gives the number of filemarks that should be written at EOD.  It is usually 1 or 2.
493 </listitem></varlistentry>
494  <!-- ==== -->
495  <varlistentry><term>FSF</term><listitem>
496  (read-write) This boolean property specifies whether the device driver may use the MTFSF operation (forward seek file).
497 </listitem></varlistentry>
498  <!-- ==== -->
499  <varlistentry><term>FSF_AFTER_FILEMARK</term><listitem>
500  (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.
501 </listitem></varlistentry>
502  <!-- ==== -->
503  <varlistentry><term>FSR</term><listitem>
504  (read-write) This boolean property specifies whether the device driver may use the MTFSR operation (forward seek record).
505 </listitem></varlistentry>
506  <!-- ==== -->
507  <varlistentry><term>NONBLOCKING_OPEN</term><listitem>
508  (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".
509 </listitem></varlistentry>
510  <!-- ==== -->
511  <varlistentry><term>READ_BLOCK_SIZE</term><listitem>
512  (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.
513  The tapetype parameter <emphasis>READBLOCKSIZE</emphasis> sets this property.  See BLOCK SIZES, above.
514 </listitem></varlistentry>
515  <!-- ==== -->
516 </variablelist>
517
518 </refsect3>
519
520 </refsect2>
521
522 <refsect2><title>NDMP Device</title>
523 <programlisting>
524 tapedev "ndmp:my.filer.com:10000@st1"
525 device_property "NDMP_USERNAME" "jimmy"
526 device_property "NDMP_PASSWORD" "thelock"
527 </programlisting>
528
529 <para>This device enables Amanda to communicate with a tape service on an NDMP
530 server.  The device name specifies the hostname and optionally the TCP port of
531 the NDMP server, followed by the name of the tape device on the server
532 (<command>st1</command> in the example above).</para>
533
534 <refsect3><title>Device-Specific Properties</title>
535
536 <para>The properties <command>NDMP_USERNAME</command> and
537 <command>NDMP_PASSWORD</command> set the username and password with which to
538 access the NDMP server.  The default for both is "ndmp".</para>
539
540 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
541 <variablelist>
542  <!-- ==== -->
543 <varlistentry><term>NDMP_AUTH</term><listitem>
544 (read-write) Authentication method to use to connect to the NDMP server.  One of
545 "md5" (default), "text", "none" (for an empty authentication attempt) or "void" (for
546 no authentication attempt at all).
547 </listitem></varlistentry>
548  <!-- ==== -->
549 <varlistentry><term>NDMP_PASSWORD</term><listitem>
550 (read-write) Password for md5 or text authentications.
551 </listitem></varlistentry>
552  <!-- ==== -->
553 <varlistentry><term>NDMP_USERNAME</term><listitem>
554 (read-write) Username for md5 or text authentications.
555 </listitem></varlistentry>
556  <!-- ==== -->
557 </variablelist>
558
559 </refsect3>
560
561 </refsect2>
562
563 <refsect2><title>VFS Device</title>
564 <programlisting>
565 tapedev "file:/path/to/vtape"
566 </programlisting>
567
568 <para>The VFS device driver stores data on a UNIX filesystem. Note
569   that although one typically uses the VFS device driver to store data
570   on hard disks, the driver does not interface with any hardware on a
571   block level.</para>
572
573 <para>The device name specifies a path to a directory which must exist and
574 contain a "data/" subdirectory.  Each tape file is stored as a distinct file in
575 this directory, the name of which reflects the Amanda header in the tape file.
576 Block boundaries are not maintained: the driver supports reads of arbitrary
577 size, regardless of the blocksize used to write the data.</para>
578
579 </refsect2>
580
581 <refsect2><title>DVD-RW Device</title>
582 <programlisting>
583 tapedev "dvdrw:/var/cache/amanda/dvd-cache:/dev/scd0"
584 device_property "DVDRW_MOUNT_POINT" "/media/dvd"
585 device_property "DVDRW_KEEP_CACHE" "false"
586 device_property "DVDRW_UNLABELLED_WHEN_UNMOUNTABLE" "true"
587 </programlisting>
588
589 <para>The DVD-RW device driver reads and writes optical media such as DVDs and
590 CDs. The device name must specify a cache directory for data to be temporarily
591 stored, followed by the operating system name for the optical drive. The cache
592 directory must contain a "data/" subdirectory.</para>
593
594 <para>The DVDRW_MOUNT_POINT property is required, and specifies a directory
595 where the optical media can be mounted. This directory must be configured to
596 enable non-root users to mount the optical media. On Linux, that means a line
597 similar to the following in /etc/fstab:</para>
598 <programlisting>
599 /dev/scd0 /media/dvd auto ro,user,noauto 0 0
600 </programlisting>
601
602 <para>Note the "user" option.</para>
603
604 <para>When writing data, the device acts as a VFS device using the given cache
605 directory. On completion of writing the tape, the cache directory is written
606 to optical media. The DVDRW_KEEP_CACHE property controls whether the cache
607 contents are immediately deleted. When reading, the optical media is first
608 mounted and read as a VFS device.</para>
609
610 <para>Attempting to mount unformatted media or media that is formatted but
611 contains no filesystem will usually result in an error. The boolean
612 DVDRW_UNLABELLED_WHEN_UNMOUNTABLE property specifies whether media that cannot
613 be mounted should be treated as an empty, unlabelled volume when attempting to
614 read the volume label. It is necessary to set this property to "true" when
615 labelling such media.</para>
616
617 <refsect3><title>Device-Specific Properties</title>
618
619 <para>The properties DVDRW_GROWISOFS_COMMAND, DVDRW_MOUNT_COMMAND and
620 DVDRW_UMOUNT_COMMAND specify alternative commands for writing, mounting and
621 unmounting optical media. The default is to find the programs using the PATH
622 environment variable.</para>
623
624 <para>The DVDRW_MOUNT_POINT property is required. Other properties are optional.</para>
625
626 <variablelist>
627  <varlistentry><term>DVDRW_KEEP_CACHE</term><listitem>
628  (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.
629 </listitem></varlistentry>
630  <varlistentry><term>DVDRW_MOUNT_POINT</term><listitem>
631  (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.
632 </listitem></varlistentry>
633  <varlistentry><term>DVDRW_UNLABELLED_WHEN_UNMOUNTABLE</term><listitem>
634  (read-write) Treat unmountable media as empty, unlabelled media. This is necessary when attempting to label freshly formatted media.
635 </listitem></varlistentry>
636  <varlistentry><term>DVDRW_GROWISOFS_COMMAND</term><listitem>
637  (read-write) The command to invoke to burn the DVD.
638 </listitem></varlistentry>
639  <varlistentry><term>DVDRW_MOUNT_COMMAND</term><listitem>
640  (read-write) The command to invoke to mount the DVD.
641 </listitem></varlistentry>
642  <varlistentry><term>DVDRW_UMOUNT_COMMAND</term><listitem>
643  (read-write) The command to invoke to unmount the DVD.
644 </listitem></varlistentry>
645 </variablelist>
646
647 </refsect3>
648
649 </refsect2>
650
651 </refsect1>
652
653 <seealso>
654 <manref name="amanda.conf" vol="5"/>,
655 </seealso>
656
657 </refentry>