]> git.sur5r.net Git - bacula/docs/blob - docs/manual/autochangerres.tex
Update
[bacula/docs] / docs / manual / autochangerres.tex
1 %%
2 \chapter{Autochanger Resource}
3 \label{Autochangerres}
4 \index[sd]{Autochanger Resource}
5 \index[sd]{Resource!Autochanger}
6
7 The Autochanger resource supports single or multiple drive
8 autochangers by grouping one or more Device resources     
9 into one unit called an autochanger in Bacula (often referred to
10 as a "tape library" by autochanger manufacturers).
11
12 If you have an Autochanger, and you want it to function correctly,
13 you {\bf must} have an Autochanger resource in your Storage
14 conf file, and your Director's Storage directives that want to
15 use an Autochanger {\bf must} refer to the Autochanger resource name.
16 In previous versions of Bacula, the Director's Storage directives
17 referred directly to Device resources that were autochangers.     
18 In version 1.38.0 and later, referring directly to Device resources
19 will not work for Autochangers.
20
21 \begin{description}
22 \item [Name = \lt{}Autochanger-Name\gt{}]
23    \index[sd]{Name}
24    Specifies the Name of the Autochanger. This name is used in
25    the Director's Storage definition to refer to the autochanger.
26    This directive is required.  
27
28 \item [Device = \lt{}Device-name1, device-name2, ...\gt{}]
29    Specifies the names of the Device resource or
30    resources that correspond
31    to the autochanger drive.  If you have a multiple drive
32    autochanger, you must specify multiple Device names, each
33    one referring to a separate Device resource that contains a  
34    Drive Index specification that corresponds to the drive
35    number base zero. You may specify multiple device names on
36    a single line separated by commas, and/or you may specify
37    multiple Device directives.
38    This directive is required.  
39
40 \item [Changer Device = {\it name-string}]
41    \index[sd]{Changer Device}
42    The specified {\bf name-string} gives the system file name of the  autochanger
43    device name. If specified in this resource, the Changer Device name
44    is not needed in the Device resource. If it is specified in the Device
45    resource (see above), it will take precedence over one specified in
46    the Autochanger resource.
47
48 \item [Changer Command = {\it name-string}]
49    \index[sd]{Changer Command  }
50    The {\bf name-string} specifies an external program to be called  that will
51    automatically change volumes as required by {\bf Bacula}.  Most frequently,
52    you will specify the Bacula supplied {\bf mtx-changer}  script as follows.
53    If it is specified here, it need not be specified in the Device
54    resource. If it is also specified in the Device resource, it will take
55    precedence over the one specified in the Autochanger resource.
56
57 \end{description}
58
59 The following is an example of a valid Autochanger resource definition: 
60
61 \footnotesize
62 \begin{verbatim}
63 Autochanger {
64   Name = "DDS-4-changer"
65   Device = DDS-4-1, DDS-4-2, DDS-4-3
66   Changer Device = /dev/sg0
67   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
68 }
69 Device {
70   Name = "DDS-4-1"
71   Drive Index = 0
72   Autochanger = yes
73   ...
74 }
75 Device {
76   Name = "DDS-4-2"
77   Drive Index = 1
78   Autochanger = yes
79   ...
80 Device {
81   Name = "DDS-4-3"
82   Drive Index = 2
83   Autochanger = yes
84   Autoselect = no
85   ...
86 }
87 \end{verbatim}
88 \normalsize
89
90 Please note that it is important to include the {\bf Autochanger = yes} directive
91 in each Device definition that belongs to an Autochanger.  A device definition
92 should not belong to more than one Autochanger resource.  Also, your Device
93 directive in the Storage resource of the Director's conf file should have
94 the Autochanger's resource name rather than a name of one of the Devices.
95
96 If you have a drive that physically belongs to an Autochanger but you don't want
97 to have it automatically used when Bacula references the Autochanger for backups,
98 for example, you want to reserve it for restores, you can add the directive:
99
100 \footnotesize
101 \begin{verbatim}
102 Autoselect = no
103 \end{verbatim}
104 \normalsize
105
106 to the Device resource for that drive. In that case, Bacula will not automatically
107 select that drive when accessing the Autochanger. You can, still use the drive
108 by referencing it by the Device name directly rather than the Autochanger name. An example
109 of such a definition is shown above for the Device DDS-4-3, which will not be
110 selected when the name DDS-4-changer is used in a Storage definition, but will
111 be used if DDS-4-3 is used.