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