Imported Upstream version 2.5.1
[debian/amanda] / man / xml-source / amtapetype.8.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 '../entities/global.entities'>
7   %global_entities;
8
9 ]>
10
11 <!-- lifted from troff+man by doclifter -->
12 <refentry id='amtapetype.8'>
13
14 <refmeta>
15 <refentrytitle>amtapetype</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18 <refnamediv>
19 <refname>amtapetype</refname>
20 <refpurpose>generate a tapetype definition.</refpurpose>
21 </refnamediv>
22 <!-- body begins here -->
23 <refsynopsisdiv>
24 <cmdsynopsis>
25   <command>amtapetype</command>    
26     <arg choice='opt'>-h </arg>
27     <arg choice='opt'>-c </arg>
28     <arg choice='opt'>-o </arg>
29     <arg choice='opt'>-b <replaceable>blocksize</replaceable></arg>
30     <arg choice='plain'>-e <replaceable>estsize</replaceable></arg>
31     <arg choice='opt'>-f <replaceable>tapedev</replaceable></arg>
32     <arg choice='opt'>-t <replaceable>typename</replaceable></arg>
33 </cmdsynopsis>
34 </refsynopsisdiv>
35
36
37 <refsect1><title>DESCRIPTION</title>
38 <para><emphasis remap='B'>amtapetype</emphasis>
39 generates a tapetype entry for &A;.</para>
40 </refsect1>
41
42 <refsect1><title>OPTIONS</title>
43 <variablelist remap='TP'>
44   <varlistentry>
45   <term><option>-h</option></term>
46   <listitem>
47 <para>Display an help message.</para>
48   </listitem>
49   </varlistentry>
50   <varlistentry>
51   <term><option>-c</option></term>
52   <listitem>
53 <para>Run only the hardware compression detection heuristic test and stop.
54 This takes a few minutes only.</para>
55   </listitem>
56   </varlistentry>
57   <varlistentry>
58   <term><option>-o</option></term>
59   <listitem>
60 <para>Overwrite the tape, even if it's an &A; tape.</para>
61   </listitem>
62   </varlistentry>
63   <varlistentry>
64   <term><option>-b</option><replaceable> blocksize</replaceable></term>
65   <listitem>
66 <para>record block size (default: 32k)</para>
67   </listitem>
68   </varlistentry>
69   <varlistentry>
70   <term><option>-e</option><replaceable> estsize</replaceable></term>
71   <listitem>
72 <para>estimated tape size (No default!)</para>
73   </listitem>
74   </varlistentry>
75   <varlistentry>
76   <term><option>-f</option><replaceable> tapedev</replaceable></term>
77   <listitem>
78 <para>tape device name (default: $TAPE)
79 The device to perform the test.</para>
80   </listitem>
81   </varlistentry>
82   <varlistentry>
83   <term><option>-t</option><replaceable> typename</replaceable></term>
84   <listitem>
85 <para>tapetype name (default: unknown-tapetype)</para>
86 <!-- .PD -->
87   </listitem>
88   </varlistentry>
89 </variablelist>
90 </refsect1>
91
92 <refsect1><title>EXAMPLE</title>
93 <para>Generate a tapetype definition for your tape device:</para>
94
95 <!-- .RS -->
96 <literallayout remap='.nf'>
97 % amtapetype -f /dev/nst0 -e 150G
98 </literallayout></refsect1>
99
100 <refsect1><title>NOTES</title>
101 <para>Hardware compression is detected by measuring
102 the writing speed difference of the tape drive
103 when writing an amount of compressable and uncompresseable data.
104 It does not rely on the status bits of the tape drive or the OS parameters.
105 If your tape drive has very large buffers or is very fast, the program
106 could fail to detect hardware compression status reliably.</para>
107
108 <para>During the first pass, it writes files that are estimated to be 1%
109 of the expected tape capacity.  It gets the expected capacity from
110 the -e command line flag, or defaults to 1 GByte.  In a perfect world
111 (which means there is zero chance of this happening with tapes :-),
112 there would be 100 files and 100 file marks.</para>
113
114 <para>During the second pass, the file size is cut in half.  In that same
115 fairyland world, this means 200 files and 200 file marks.</para>
116
117 <para>In both passes the total amount of data written is summed as well as the
118 number of file marks written.  At the end of the second pass, quoting
119 from the code:</para>
120
121 <para>* Compute the size of a filemark as the difference in data written
122 between pass 1 and pass 2 divided by the difference in number of
123 file marks written between pass 1 and pass 2. ... *</para>
124
125 <para>So if we wrote 1.0 GBytes on the first pass and 100 file marks, and
126 0.9 GBytes on the second pass with 200 file marks, those additional 100
127 file marks in the second pass took 0.1 GBytes and therefor a file mark
128 is 0.001 GBytes (1 MByte).</para>
129
130 <para>Note that if the estimated capacity is wrong, the only thing that happens
131 is a lot more (or less, but unlikely) files, and thus, file marks,
132 get written.  But the math still works out the same.  The -e flag is
133 there to keep the number of file marks down because they can be slow
134 (since they force the drive to flush all its buffers to physical media).</para>
135
136 <para>All sorts of things might happen to cause the amount of data
137 written to vary enough to generate a big file mark size guess.  A little
138 more &quot;shoe shining&quot; because of the additional file marks (and flushes),
139 dirt left on the heads from the first pass of a brand new tape, the
140 temperature/humidity changed during the multi-hour run, a different amount
141 of data was written after the last file mark before EOT was reported, etc.</para>
142
143 <para>Note that the file mark size might really be zero for whatever device this
144 is, and it was just the measured capacity variation that caused &amtapetype;
145 to think those extra file marks in pass 2 actually took up space.</para>
146
147 <para>It also explains why &amtapetype; used to sometimes report a negative file
148 mark size if the math happened to end up that way.  When that happens
149 now we just report it as zero.</para>
150 </refsect1>
151
152 <refsect1><title>SEE ALSO</title>
153 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
154 </refsect1>
155 </refentry>
156