Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 176

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Storage Daemon Configuration</TITLE>
<META NAME="description" CONTENT="Storage Daemon Configuration">
<META NAME="keywords" CONTENT="main">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="main.css">

<LINK REL="next" HREF="Autochanger_Resource.html">
<LINK REL="previous" HREF="Client_File_daemon_Configur.html">
<LINK REL="up" HREF="Bacula_Main_Reference.html">
<LINK REL="next" HREF="Autochanger_Resource.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1502"
  HREF="Autochanger_Resource.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1496"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1490"
  HREF="Client_File_daemon_Configur.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1498"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1500"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1503"
  HREF="Autochanger_Resource.html">Autochanger Resource</A>
<B> Up:</B> <A NAME="tex2html1497"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1491"
  HREF="Client_File_daemon_Configur.html">Client/File daemon Configuration</A>
 &nbsp; <B>  <A NAME="tex2html1499"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1501"
  HREF="Thanks.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html1504"
  HREF="Storage_Daemon_Configuratio.html#SECTION002010000000000000000">Storage Resource</A>
<LI><A NAME="tex2html1505"
  HREF="Storage_Daemon_Configuratio.html#SECTION002020000000000000000">Director Resource</A>
<LI><A NAME="tex2html1506"
  HREF="Storage_Daemon_Configuratio.html#SECTION002030000000000000000">Device Resource</A>
<LI><A NAME="tex2html1507"
  HREF="Storage_Daemon_Configuratio.html#SECTION002040000000000000000">Edit Codes for Mount and Unmount Directives</A>
<LI><A NAME="tex2html1508"
  HREF="Storage_Daemon_Configuratio.html#SECTION002050000000000000000">Devices that require a mount (DVD)</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION002000000000000000000"></A>
<A NAME="StoredConfChapter"></A>
<BR>
Storage Daemon Configuration
</H1>
<A NAME="11410"></A>
<A NAME="11411"></A>

<P>
The Storage Daemon configuration file has relatively few resource definitions.
However, due to the great variation in backup media and system capabilities,
the storage daemon must be highly configurable. As a consequence, there are
quite a large number of directives in the Device Resource definition that
allow you to define all the characteristics of your Storage device (normally a
tape drive). Fortunately, with modern storage devices, the defaults are
sufficient, and very few directives are actually needed. 

<P>
Examples of <B>Device</B> resource directives that are known to work for a
number of common tape drives can be found in the <B>bacula-src/examples/devices</B> directory, and most will also be listed
here. 

<P>
For a general discussion of configuration file and resources including the
data types recognized by <B>Bacula</B>, please see the 
ConfigurationConfigureChapter chapter of this manual. The
following Storage Resource definitions must be defined: 

<P>

<UL>
<LI>StorageStorageResource - to define the  name of the
   Storage daemon.  
</LI>
<LI>DirectorDirectorResource1 - to  define the Director's
   name and his access password.  
</LI>
<LI>DeviceDeviceResource - to define  the
   characteristics of your storage device (tape  drive).  
</LI>
<LI>MessagesMessagesChapter - to define where error  and
   information messages are to be sent. 
</LI>
</UL>

<P>

<H1><A NAME="SECTION002010000000000000000"></A>
<A NAME="StorageResource"></A>
<BR>
Storage Resource
</H1>
<A NAME="11430"></A>
<A NAME="11431"></A>

<P>
In general, the properties specified under the Storage resource define global
properties of the Storage daemon. Each Storage daemon configuration file must
have one and only one Storage resource definition. 

<P>
<DL>
<DT><STRONG>Name = Storage-Daemon-Name</STRONG></DT>
<DD><A NAME="11435"></A>
   <A NAME="11436"></A>
   Specifies the Name of the Storage daemon. This  directive is required. 

<P>
</DD>
<DT><STRONG>Working Directory = Directory</STRONG></DT>
<DD><A NAME="11439"></A>
   <A NAME="11440"></A>
   This directive  is mandatory and specifies a directory in which the Storage
   daemon  may put its status files. This directory should be used only  by <B>   Bacula</B>, but may be shared by other Bacula daemons provided the names
   given to each daemon are unique. This  directive is
   required  

<P>
</DD>
<DT><STRONG>Pid Directory = Directory</STRONG></DT>
<DD><A NAME="11444"></A>
   <A NAME="11445"></A>
   This directive  is mandatory and specifies a directory in which the Director 
   may put its process Id file files. The process Id file is used to  shutdown
   Bacula and to prevent multiple copies of  Bacula from running simultaneously. 
   This directive is required. Standard shell expansion of the <B>Directory</B> 
   is done when the configuration file is read so that values such  as <B>   $HOME</B> will be properly expanded.  

<P>
Typically on Linux systems, you will set this to:  <B>/var/run</B>. If you are
   not installing Bacula in the  system directories, you can use the <B>Working
   Directory</B> as  defined above. 

<P>
</DD>
<DT><STRONG>Heartbeat Interval = time-interval</STRONG></DT>
<DD><A NAME="11452"></A>
   <A NAME="11453"></A>
   <A NAME="11454"></A>
   <A NAME="11455"></A>
   This directive defines an interval of time in seconds.  When
   the Storage daemon is waiting for the operator to mount a
   tape, each time interval, it will send a heartbeat signal to
   the File daemon.  The default interval is zero which disables
   the heartbeat.  This feature is particularly useful if you
   have a router such as 3Com that does not follow Internet
   standards and times out an valid connection after a short
   duration despite the fact that keepalive is set.  This usually
   results in a broken pipe error message.

<P>
</DD>
<DT><STRONG>Client Connect Wait = time-interval</STRONG></DT>
<DD><A NAME="11458"></A>
   <A NAME="11459"></A>
   <A NAME="11460"></A>
   This directive defines an interval of time in seconds that
   the Storage daemon will wait for a Client (the File daemon)
   to connect.  The default is 30 minutes.  Be aware that the
   longer the Storage daemon waits for a Client, the more
   resources will be tied up.

<P>
</DD>
<DT><STRONG>Maximum Concurrent Jobs = number</STRONG></DT>
<DD><A NAME="11463"></A>
   <A NAME="11464"></A>
   where number is the maximum number of Jobs that may run
   concurrently.  The default is set to 10, but you may set it to a larger
   number.  Each contact from the Director (e.g.  status request, job start
   request) is considered as a Job, so if you want to be able to do a <B>   status</B> request in the console at the same time as a Job is running, you
   will need to set this value greater than 1.  To run simultaneous Jobs,
   you will need to set a number of other directives in the Director's
   configuration file.  Which ones you set depend on what you want, but you
   will almost certainly need to set the <B>Maximum Concurrent Jobs</B> in
   the Storage resource in the Director's configuration file and possibly
   those in the Job and Client resources.

<P>
</DD>
<DT><STRONG>SDAddresses = IP-address-specification</STRONG></DT>
<DD><A NAME="11471"></A>
   <A NAME="11472"></A>
   Specify the ports and addresses on which the Storage daemon will listen
   for Director connections.  Normally, the default is sufficient and you
   do not need to specify this directive.  Probably the simplest way to
   explain how this directive works is to show an example:

<P>
<PRE>
 SDAddresses  = { ip = {
        addr = 1.2.3.4; port = 1205; }
    ipv4 = {
        addr = 1.2.3.4; port = http; }
    ipv6 = {
        addr = 1.2.3.4;
        port = 1205;
    }
    ip = {
        addr = 1.2.3.4
        port = 1205
    }
    ip = {
        addr = 1.2.3.4
    }
    ip = {
        addr = 201:220:222::2
    }
    ip = {
        addr = bluedot.thun.net
    }
}
</PRE>
<P>
where ip, ip4, ip6, addr, and port are all keywords. Note, that  the address
can be specified as either a dotted quadruple, or  IPv6 colon notation, or as
a symbolic name (only in the ip specification).  Also, port can be specified
as a number or as the mnemonic value from  the /etc/services file.  If a port
is not specified, the default will be used. If an ip  section is specified,
the resolution can be made either by IPv4 or  IPv6. If ip4 is specified, then
only IPv4 resolutions will be permitted,  and likewise with ip6.  

<P>
Using this directive, you can replace both the SDPort and SDAddress 
directives shown below. 

<P>
</DD>
<DT><STRONG>SDPort = port-number</STRONG></DT>
<DD><A NAME="11477"></A>
   <A NAME="11478"></A>
   Specifies port number on which the Storage daemon  listens for Director
   connections. The default is 9103.  

<P>
</DD>
<DT><STRONG>SDAddress = IP-Address</STRONG></DT>
<DD><A NAME="11481"></A>
   <A NAME="11482"></A>
   This directive is optional, and if it is specified, it will cause the
   Storage daemon server (for Director and File daemon connections) to bind
   to the specified <B>IP-Address</B>, which is either a domain name or an
   IP address specified as a dotted quadruple.  If this directive is not
   specified, the Storage daemon will bind to any available address (the
   default).

<P>
</DD>
</DL>

<P>
The following is a typical Storage daemon Storage definition. 

<P>
<PRE>
#
# "Global" Storage daemon configuration specifications appear
# under the Storage resource.
#
Storage {
  Name = "Storage daemon"
  Address = localhost
  WorkingDirectory = "~/bacula/working"
  Pid    Directory = "~/bacula/working"
}
</PRE>
<P>

<H1><A NAME="SECTION002020000000000000000"></A>
<A NAME="DirectorResource1"></A>
<BR>
Director Resource
</H1>
<A NAME="11489"></A>
<A NAME="11490"></A>

<P>
The Director resource specifies the Name of the Director which is permitted
to use the services of the Storage daemon.  There may be multiple Director
resources.  The Director Name and Password must match the corresponding
values in the Director's configuration file.

<P>
<DL>
<DT><STRONG>Name = Director-Name</STRONG></DT>
<DD><A NAME="11494"></A>
   <A NAME="11495"></A>
   Specifies the Name of the Director allowed to connect  to the Storage daemon.
   This directive is required.  

<P>
</DD>
<DT><STRONG>Password = Director-password</STRONG></DT>
<DD><A NAME="11498"></A>
   <A NAME="11499"></A>
   Specifies the password that must be supplied by the above named  Director.
   This directive is required.  

<P>
</DD>
<DT><STRONG>Monitor = yesno</STRONG></DT>
<DD><A NAME="11503"></A>
   <A NAME="11504"></A>
   If Monitor is set to <B>no</B> (default), this director will have full
   access to this Storage daemon.  If Monitor is set to <B>yes</B>, this
   director will only be able to fetch the current status of this Storage
   daemon.

<P>
Please note that if this director is being used by a Monitor, we highly 
   recommend to set this directive to <B>yes</B> to avoid serious security 
   problems. 

<P>
</DD>
</DL>

<P>
The following is an example of a valid Director resource definition: 

<P>
<PRE>
Director {
  Name = MainDirector
  Password = my_secret_password
}
</PRE>
<P>
<A NAME="DeviceResource"></A>
<H1><A NAME="SECTION002030000000000000000">
Device Resource</A>
</H1>
<A NAME="11513"></A>
<A NAME="11514"></A>

<P>
The Device Resource specifies the details of each device (normally a tape
drive) that can be used by the Storage daemon.  There may be multiple
Device resources for a single Storage daemon.  In general, the properties
specified within the Device resource are specific to the Device.

<P>
<DL>
<DT><STRONG>Name = <I>Device-Name</I></STRONG></DT>
<DD><A NAME="11517"></A>
   <A NAME="11518"></A>
   Specifies the Name that the Director will use when asking to backup or
   restore to or from to this device. This is the logical  Device name, and may
   be any string up to 127 characters in length.  It is generally a good idea to
   make it correspond to the English  name of the backup device. The physical
   name of the device is  specified on the <B>Archive Device</B> directive
   described below.  The name you specify here is also used in your Director's
   conf  file on the 
   Device directiveStorageResource2  in its Storage
   resource. 

<P>
</DD>
<DT><STRONG>Archive Device = <I>name-string</I></STRONG></DT>
<DD><A NAME="11523"></A>
   <A NAME="11524"></A>
   The specified <B>name-string</B> gives the system file name of the  storage
   device managed by this storage daemon. This will usually be  the device file
   name of a removable storage device (tape drive),  for example "<B>   /dev/nst0</B>" or "<B>/dev/rmt/0mbn</B>".  For a DVD-writer, it will be for
   example <B>/dev/hdc</B>.  It may also be a directory name if you are archiving
   to disk storage.  In this case, you must supply the full absolute path to the
   directory.  When specifying a tape device, it is preferable that the 
   "non-rewind" variant of the device file name be given.  In addition, on
   systems such as Sun, which have multiple tape  access methods, you must be
   sure to specify to use  Berkeley I/O conventions with the device. The <B>b</B>
   in the Solaris (Sun)  archive specification <B>/dev/rmt/0mbn</B> is what is
   needed in  this case. Bacula does not support SysV tape drive behavior.  

<P>
As noted above, normally the Archive Device is the name of a tape drive, but
   you may also specify an absolute path to an existing directory. If the
   Device is a directory Bacula will write to file storage in the specified
   directory, and the filename used will be the Volume name as specified in the
   Catalog.  If you want to write into more than one directory (i.e.  to spread
   the load to different disk drives), you will need to define two Device
   resources, each containing an Archive Device with a different directory.
   <A NAME="SetupFifo"></A>   In addition to a tape device name or a directory name, Bacula will  accept the
   name of a FIFO. A FIFO is a special kind of file that  connects two programs
   via kernel memory. If a FIFO device is specified  for a backup operation, you
   must have a program that reads what Bacula  writes into the FIFO. When the
   Storage daemon starts the job, it  will wait for <B>MaximumOpenWait</B> seconds
   for the read program to start reading, and then time it out and  terminate
   the job. As a consequence, it is best to start the read  program at the
   beginning of the job perhaps with the <B>RunBeforeJob</B>  directive. For this
   kind of device, you never want to specify  <B>AlwaysOpen</B>, because you want
   the Storage daemon to open it only  when a job starts, so you must explicitly
   set it to <B>No</B>.  Since a FIFO is a one way device, Bacula will not attempt
   to read  a label of a FIFO device, but will simply write on it. To create a 
   FIFO Volume in the catalog, use the <B>add</B> command rather than the <B>   label</B> command to avoid attempting to write a label.

<P>
<PRE>
Device {
  Name = FifoStorage
  Media Type = Fifo
  Device Type = Fifo
  Archive Device = /tmp/fifo
  LabelMedia = yes
  Random Access = no
  AutomaticMount = no
  RemovableMedia = no
  MaximumOpenWait = 60
  AlwaysOpen = no
}
</PRE>
<P>
During a restore operation, if the Archive Device is a FIFO, Bacula  will
   attempt to read from the FIFO, so you must have an external program  that
   writes into the FIFO. Bacula will wait <B>MaximumOpenWait</B> seconds  for the
   program to begin writing and will then time it out and  terminate the job. As
   noted above, you may use the <B>RunBeforeJob</B>  to start the writer program
   at the beginning of the job.  

<P>
The Archive Device directive is required. 

<P>
</DD>
<DT><STRONG>Device Type = <I>type-specification</I></STRONG></DT>
<DD><A NAME="11543"></A>
   <A NAME="11544"></A>
   The Device Type specification allows you to explicitly tell Bacula
   what kind of device you are defining. It the <I>type-specification</I>
   may be one of the following:
   <DL>
<DT><STRONG>File</STRONG></DT>
<DD>Tells Bacula that the device is a file. It may either be a
     file defined on fixed medium or a removable filesystem such as
     USB.  All files must be random access devices.
   
</DD>
<DT><STRONG>Tape</STRONG></DT>
<DD>The device is a tape device and thus is sequential access. Tape devices
     are controlled using ioctl() calls.
   
</DD>
<DT><STRONG>Fifo</STRONG></DT>
<DD>The device is a first-in-first out sequential access read-only 
     or write-only device.
   
</DD>
<DT><STRONG>DVD</STRONG></DT>
<DD>The device is a DVD. DVDs are sequential access for writing, but
     random access for reading.
  
</DD>
</DL>

<P>
The Device Type directive is not required, and if not specified, Bacula
  will attempt to guess what kind of device has been specified using the
  Archive Device specification supplied. There are several advantages to
  explicitly specifying the Device Type. First, on some systems, block and
  character devices have the same type, which means that on those systems,
  Bacula is unlikely to be able to correctly guess that a device is a DVD.
  Secondly, if you explicitly specify the Device Type, the mount point
  need not be defined until the device is opened. This is the case with
  most removable devices such as USB that are mounted by the HAL daemon.
  If the Device Type is not explicitly specified, then the mount point
  must exist when the Storage daemon starts.

<P>
This directive was implemented in Bacula version 1.38.6.

<P>
</DD>
<DT><STRONG>Media Type = <I>name-string</I></STRONG></DT>
<DD><A NAME="11549"></A>
   <A NAME="11550"></A>
   The specified <B>name-string</B> names the type of media supported by this
   device, for example, "DLT7000".  Media type names are arbitrary in that you
   set them to anything you want, but they must be known to the volume
   database to keep track of which storage daemons can read which volumes.  In
   general, each different storage type should have a unique Media Type
   associated with it.  The same <B>name-string</B> must appear in the
   appropriate Storage resource definition in the Director's configuration
   file.

<P>
Even though the names you assign are arbitrary (i.e.  you choose the name
   you want), you should take care in specifying them because the Media Type
   is used to determine which storage device Bacula will select during
   restore.  Thus you should probably use the same Media Type specification
   for all drives where the Media can be freely interchanged.  This is not
   generally an issue if you have a single Storage daemon, but it is with
   multiple Storage daemons, especially if they have incompatible media.

<P>
For example, if you specify a Media Type of "DDS-4" then during the
   restore, Bacula will be able to choose any Storage Daemon that handles
   "DDS-4".  If you have an autochanger, you might want to name the Media Type
   in a way that is unique to the autochanger, unless you wish to possibly use
   the Volumes in other drives.  You should also ensure to have unique Media
   Type names if the Media is not compatible between drives.  This
   specification is required for all devices.

<P>
In addition, if you are using disk storage, each Device resource will
   generally have a different mount point or directory. In order for
   Bacula to select the correct Device resource, each one must have a
   unique Media Type.

<P>
<A NAME="Autochanger"></A></DD>
<DT><STRONG>Autochanger = <I>yesno</I></STRONG></DT>
<DD><A NAME="11555"></A>
   <A NAME="11556"></A>
   If <B>Yes</B>, this device belongs to an automatic tape changer, and you
   must specify an <B>Autochanger</B> resource that points to the <B>   Device</B> resources.  You must also specify a 
   <B>Changer Device</B>.  If the Autochanger directive is set to <B>   No</B> (default), the volume must be manually changed.  You should also
   have an identical directive to the  
   Storage resourceAutochanger1  in the Director's
   configuration file so that  when labeling tapes you are prompted for the slot.

<P>
</DD>
<DT><STRONG>Changer Device = <I>name-string</I></STRONG></DT>
<DD><A NAME="11565"></A>
   <A NAME="11566"></A>
   The specified <B>name-string</B> must be the <B>generic SCSI</B> device
   name of the autochanger that corresponds to the normal read/write
   <B>Archive Device</B>  specified in the Device resource. This
   generic SCSI device name should be specified if you have an autochanger 
   or if you have a standard tape drive and want to use the
   <B>Alert Command</B> (see below). For example, on Linux systems, for 
   an Archive Device name of <B>/dev/nst0</B>, you would specify <B>   /dev/sg0</B> for the Changer Device name. Depending on your exact
   configuration, and the number of autochangers or the type of
   autochanger, what you specify here can vary.  This directive is
   optional.  See the  Using AutochangersAutochangersChapter chapter
   of this manual for more details of using this and the following
   autochanger directives.

<P>
</DD>
<DT><STRONG>Changer Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11576"></A>
   <A NAME="11577"></A>
   The <B>name-string</B> specifies an external program to be called  that will
   automatically change volumes as required by <B>Bacula</B>.  Normally,
   this directive will be specified only in the <B>AutoChanger</B> resource,
   which is then used for all devices.  However, you may also specify
   the different <B>Changer Command</B> in each Device resource.
   Most frequently,
   you will specify the Bacula supplied <B>mtx-changer</B>  script as follows:  

<P>
<PRE>
Changer Command = "/path/mtx-changer %c %o %S %a %d"
</PRE>
<P>
and you will install the <B>mtx</B> on your system (found  in the <B>depkgs</B>
   release). An example of this command is in the default bacula-sd.conf file. 
   For more details on the substitution characters that may be specified  to
   configure your autochanger please see  the 
   AutochangersAutochangersChapter chapter of this  manual.
   For FreeBSD users, you might want to see one of the  several <B>chio</B>
   scripts in <B>examples/autochangers</B>.  

<P>
</DD>
<DT><STRONG>Alert Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11592"></A>
   The <B>name-string</B> specifies an external program to be called at the
   completion of each Job after the device is released.  The purpose of this
   command is to check for Tape Alerts, which are present when something is
   wrong with your tape drive (at least for most modern tape drives).  The same
   substitution characters that may be specified in the Changer Command may
   also be used in this string.  For more information, please see the
   AutochangersAutochangersChapter chapter of this manual.

<P>
Note, it is not necessary to have an autochanger to use this command. The
   example below uses the <B>tapeinfo</B> program that comes with the <B>mtx</B>
   package, but it can be used on any tape drive. However, you will need to
   specify a <B>Changer Device</B> directive in your Device resource (see above)
   so that the generic SCSI device name can be edited into the command (with
   the %c).

<P>
An example of the use of this command to print Tape Alerts  in the Job report
   is:  

<P>
<PRE>
Alert Command = "sh -c 'tapeinfo -f %c | grep TapeAlert'"
      </PRE>
<P>
and an example output when there is a problem could be:  

<P>
<PRE>
bacula-sd  Alert: TapeAlert[32]: Interface: Problem with SCSI interface
                  between tape drive and initiator.
</PRE>
<P>
</DD>
<DT><STRONG>Drive Index = <I>number</I></STRONG></DT>
<DD><A NAME="11604"></A>
   <A NAME="11605"></A>
   The <B>Drive Index</B> that you specify is passed to the <B>   mtx-changer</B> script and is thus passed to the <B>mtx</B> program.  By
   default, the Drive Index is zero, so if you have only one drive in your
   autochanger, everything will work normally.  However, if you have
   multiple drives, you must specify multiple Bacula Device resources (one
   for each drive).  The first Device should have the Drive Index set to 0,
   and the second Device Resource should contain a Drive Index set to 1,
   and so on.  This will then permit you to use two or more drives in your
   autochanger.  As of Bacula version 1.38.0, using the <B>Autochanger</B>
   resource, Bacula will automatically ensure that only one drive at a time
   uses the autochanger script, so you no longer need locking scripts as in
   the past - the default mtx-changer script works for any number of
   drives.

<P>
</DD>
<DT><STRONG>Autoselect = <I>yesno</I></STRONG></DT>
<DD><A NAME="11611"></A>
   <A NAME="11612"></A>
   If this directive is set to <B>yes</B> (default), and the Device
   belongs to an autochanger, then when the Autochanger is referenced
   by the Director, this device can automatically be selected. If this
   directive is set to <B>no</B>, then the Device can only be referenced
   by directly using the Device name in the Director. This is useful
   for reserving a drive for something special such as a high priority
   backup or restore operations.

<P>
</DD>
<DT><STRONG>Maximum Concurent Jobs = <I>num</I></STRONG></DT>
<DD><A NAME="11616"></A>

<P>
<B>Maximum Concurrent Jobs</B> is a directive that permits setting the maximum
number of Jobs that can run concurrently on a specified Device.  Using this
directive, it is possible to have different Jobs using multiple drives, because
when the Maximum Concurrent Jobs limit is reached, the Storage Daemon will
start new Jobs on any other available compatible drive.  This facilitates
writing to multiple drives with multiple Jobs that all use the same Pool.

<P>
</DD>
<DT><STRONG>Maximum Changer Wait = <I>time</I></STRONG></DT>
<DD><A NAME="11619"></A>
   <A NAME="11620"></A>
   This directive specifies the maximum time in seconds for Bacula to wait
   for an autochanger to change the volume.  If this time is exceeded,
   Bacula will invalidate the Volume slot number stored in the catalog and
   try again.  If no additional changer volumes exist, Bacula will ask the
   operator to intervene.  The default is 5 minutes.      

<P>
</DD>
<DT><STRONG>Maximum Rewind Wait = <I>time</I></STRONG></DT>
<DD><A NAME="11622"></A>
   <A NAME="11623"></A>
   This directive specifies the maximum time in seconds for Bacula to wait
   for a rewind before timing out.  If this time is exceeded,
   Bacula will cancel the job.  The default is 5 minutes.

<P>
</DD>
<DT><STRONG>Maximum Open Wait = <I>time</I></STRONG></DT>
<DD><A NAME="11625"></A>
   <A NAME="11626"></A>
   This directive specifies the maximum time in seconds for Bacula to wait
   for a open before timing out.  If this time is exceeded,
   Bacula will cancel the job.  The default is 5 minutes.

<P>
</DD>
<DT><STRONG>Always Open = <I>yesno</I></STRONG></DT>
<DD><A NAME="11628"></A>
   <A NAME="11629"></A>
   If <B>Yes</B> (default), Bacula will always keep the device open unless
   specifically <B>unmounted</B> by the Console program.  This permits
   Bacula to ensure that the tape drive is always available, and properly
   positioned. If you set
   <B>AlwaysOpen</B> to <B>no</B> <B>Bacula</B> will only open the drive when
   necessary, and at the end of the Job if no other Jobs are using the
   drive, it will be freed.  The next time Bacula wants to append to a tape
   on a drive that was freed, Bacula will rewind the tape and position it to
   the end.  To avoid unnecessary tape positioning and to minimize
   unnecessary operator intervention, it is highly recommended that <B>   Always Open = yes</B>.  This also ensures that the drive is available when
   Bacula needs it.

<P>
If you have <B>Always Open = yes</B> (recommended) and you want to use the
   drive for something else, simply use the <B>unmount</B> command in the
   Console program to release the drive. However, don't forget to remount the
   drive with <B>mount</B> when the drive is available or the next Bacula job
   will block.

<P>
For File storage, this directive is ignored. For a FIFO storage  device, you
   must set this to <B>No</B>.  

<P>
Please note that if you set this directive to <B>No</B> Bacula  will release
   the tape drive between each job, and thus the next job  will rewind the tape
   and position it to the end of the data. This  can be a very time consuming
   operation. In addition, with this directive set to no, certain multiple
   drive autochanger operations will fail.  We strongly recommend to keep
   <B>Always Open</B> set to <B>Yes</B>

<P>
</DD>
<DT><STRONG>Volume Poll Interval = <I>time</I></STRONG></DT>
<DD><A NAME="11644"></A>
   <A NAME="11645"></A>
   If the time  specified on this directive is non-zero, after  asking the
   operator to mount a new volume Bacula will  periodically poll (or read) the
   drive at the specified  interval to see if a new volume has been mounted. If
   the  time interval is zero (the default), no polling will occur.  This
   directive can be useful if you want to avoid operator  intervention via the
   console. Instead, the operator can  simply remove the old volume and insert
   the requested one,  and Bacula on the next poll will recognize the new tape
   and  continue. Please be aware that if you set this interval  too small, you
   may excessively wear your tape drive if the  old tape remains in the drive,
   since Bacula will read it on  each poll. This can be avoided by ejecting the
   tape using  the <B>Offline On Unmount</B> and the <B>Close on Poll</B> 
   directives. 
   However, if you are using a Linux 2.6 kernel or other OSes
   such as FreeBSD or Solaris, the Offline On Unmount will leave the drive
   with no tape, and Bacula will not be able to properly open the drive and
   may fail the job.  For more information on this problem, please see the
   description of Offline On UnmountNoTapeInDrive in the Tape
   Testing chapter.

<P>
</DD>
<DT><STRONG>Close on Poll= <I>yesno</I></STRONG></DT>
<DD><A NAME="11651"></A>
   <A NAME="11652"></A>
   If <B>Yes</B>, Bacula close the device (equivalent to  an unmount except no
   mount is required) and reopen it at each  poll. Normally this is not too
   useful unless you have the  <B>Offline on Unmount</B> directive set, in which
   case the  drive will be taken offline preventing wear on the tape  during any
   future polling. Once the operator inserts a new  tape, Bacula will recognize
   the drive on the next poll and  automatically continue with the backup. 
   Please see above more more details.

<P>
</DD>
<DT><STRONG>Maximum Open Wait = <I>time</I></STRONG></DT>
<DD><A NAME="11656"></A>
   <A NAME="11657"></A>
   This directive specifies the maximum amount of time in seconds that
   Bacula will wait for a device that is busy.  The default is 5 minutes.
   If the device cannot be obtained, the current Job will be terminated in
   error.  Bacula will re-attempt to open the drive the next time a Job
   starts that needs the the drive.

<P>
<A NAME="removablemedia"></A></DD>
<DT><STRONG>Removable media = <I>yesno</I></STRONG></DT>
<DD><A NAME="11660"></A>
   <A NAME="11661"></A>
   If <B>Yes</B>, this device supports removable media (for example, tapes
   or CDs).  If <B>No</B>, media cannot be removed (for example, an
   intermediate backup area on a hard disk). If <B>Removable media</B> is
   enabled on a File device (as opposed to a tape) the Storage daemon will
   assume that device may be something like a USB device that can be
   removed or a simply a removable harddisk. When attempting to open
   such a device, if the Volume is not found (for File devices, the Volume
   name is the same as the Filename), then the Storage daemon will search
   the entire device looking for likely Volume names, and for each one 
   found, it will ask the Director if the Volume can be used.  If so,
   the Storage daemon will use the first such Volume found.  Thus it
   acts somewhat like a tape drive - if the correct Volume is not found,
   it looks at what actually is found, and if it is an appendable Volume,
   it will use it.

<P>
If the removable medium is not automatically mounted (e.g. udev), then
   you might consider using additional Storage daemon device directives
   such as <B>Requires Mount</B>, <B>Mount Point</B>, <B>Mount Command</B>,
   and <B>Unmount Command</B>, all of which can be used in conjunction with
   <B>Removable Media</B>.    

<P>
</DD>
<DT><STRONG>Random access = <I>yesno</I></STRONG></DT>
<DD><A NAME="11671"></A>
   <A NAME="11672"></A>
   If <B>Yes</B>, the archive device is assumed to be a random access medium
   which supports the <B>lseek</B> (or <B>lseek64</B> if Largefile is enabled
   during configuration) facility. This should be set to <B>Yes</B> for all
   file systems such as DVD, USB, and fixed files.  It should be set to
   <B>No</B> for non-random access devices such as tapes and named pipes.

<P>
</DD>
<DT><STRONG>Requires Mount = <I>yesno</I></STRONG></DT>
<DD><A NAME="11679"></A>
   When this directive is enabled, the Storage daemon will submit
   a <B>Mount Command</B> before attempting to open the device.
   You must set this directive to <B>yes</B> for DVD-writers and removable
   file systems such as USB devices that are not automatically mounted
   by the operating system when plugged in or opened by Bacula.
   It should be set to <B>no</B> for
   all other devices such as tapes and fixed filesystems. It should also
   be set to <B>no</B> for any removable device that is automatically
   mounted by the operating system when opened (e.g. USB devices mounted
   by udev or hotplug). This directive
   indicates if the device requires to be mounted using the <B>Mount
   Command</B>.  To be able to write a DVD, the following directives must also
   be defined: <B>Mount Point</B>, <B>Mount Command</B>, <B>Unmount
   Command</B> and <B>Write Part Command</B>.

<P>
</DD>
<DT><STRONG>Mount Point = <I>directory</I></STRONG></DT>
<DD><A NAME="11690"></A>
   Directory where the device can be mounted. 
   This directive is used only
   for devices that have <B>Requires Mount</B> enabled such as DVD or 
   USB file devices.

<P>
</DD>
<DT><STRONG>Mount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11693"></A>
   This directive specifies the command that must be executed to mount 
   devices such as DVDs and many USB devices. For DVDs, the
   device is written directly, but the mount command is necessary in
   order to determine the free space left on the DVD. Before the command is 
   executed, %a is replaced with the Archive Device, and %m with the Mount 
   Point.

<P>
Most frequently, for a DVD, you will define it as follows:  

<P>
<PRE>
  Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
</PRE>
<P>
However, if you have defined a mount point in /etc/fstab, you might be
able to use a mount command such as:

<P>
<PRE>
  Mount Command = "/bin/mount /media/dvd"
</PRE>
<P>
See the Edit Codesmountcodes section below for more details of
the editing codes that can be used in this directive.

<P>
If you need to specify multiple commands, create a shell script.

<P>
</DD>
<DT><STRONG>Unmount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11701"></A>
   This directive specifies the command that must be executed to unmount 
   devices such as DVDs and many USB devices. Before the command  is
   executed, %a is replaced with the Archive Device, and %m with the  Mount
   Point.

<P>
Most frequently, you will define it as follows:  

<P>
<PRE>
  Unmount Command = "/bin/umount %m"
</PRE>
<P>
See the Edit Codesmountcodes section below for more details of
the editing codes that can be used in this directive.

<P>
If you need to specify multiple commands, create a shell script.

<P>
</DD>
<DT><STRONG>Block Checksum = <I>yes/no</I></STRONG></DT>
<DD><P>
You may turn off the Block Checksum (CRC32) code that Bacula uses when
  writing blocks to a Volume. Doing so can reduce the Storage daemon CPU usage
  slightly.  It will also permit Bacula to read a Volume that has corrupted
  data.

<P>
The default is <B>yes</B> - i.e. the checksum is computed on write and
  checked on read.

<P>
<B>We do not recommend to turn this off</B> particularly on older tape
  drives or for disk Volumes where doing so may allow corrupted data to go
  undetected.

<P>
</DD>
<DT><STRONG>Minimum block size = <I>size-in-bytes</I></STRONG></DT>
<DD><A NAME="11710"></A>
   <A NAME="11711"></A>
   On most modern tape drives, you will not need or want to specify this
   directive, and if you do so, it will be to make Bacula use fixed block
   sizes.  This statement applies only to non-random access devices (e.g.
   tape drives).  Blocks written by the storage daemon to a non-random
   archive device will never be smaller than the given <B>size-in-bytes</B>.
   The Storage daemon will attempt to efficiently fill blocks with data
   received from active sessions but will, if necessary, add padding to a
   block to achieve the required minimum size.

<P>
To force the block size to be fixed, as is the case for some non-random
   access devices (tape drives), set the <B>Minimum block size</B> and the
   <B>Maximum block size</B> to the same value (zero included).  The default
   is that both the minimum and maximum block size are zero and the default
   block size is 64,512 bytes. 

<P>
For  example, suppose you want a fixed block size of 100K bytes, then you 
   would specify:  

<P>
<PRE>
 
    Minimum block size = 100K
    Maximum block size = 100K
</PRE>
<P>
Please note that if you specify a fixed block size as shown above,  the tape
   drive must either be in variable block size mode, or  if it is in fixed block
   size mode, the block size (generally  defined by <B>mt</B>) <B>must</B> be
   identical to the size specified  in Bacula - otherwise when you attempt to
   re-read your Volumes,  you will get an error.  

<P>
If you want the  block size to be variable but with a 64K minimum and 200K
   maximum (and  default as well), you would specify:  

<P>
<PRE>
 
    Minimum block size = 64K
    Maximum blocksize = 200K
</PRE>
<P>
</DD>
<DT><STRONG>Maximum block size = <I>size-in-bytes</I></STRONG></DT>
<DD><A NAME="11722"></A>
   <A NAME="11723"></A>
   On most modern tape drives, you will not need to specify this directive.
   If you do so, it will most likely be to use fixed block sizes (see
   Minimum block size above).  The Storage daemon will always attempt to
   write blocks of the specified <B>size-in-bytes</B> to the archive device.
   As a consequence, this statement specifies both the default block size
   and the maximum block size.  The size written never exceed the given
   <B>size-in-bytes</B>.  If adding data to a block would cause it to exceed
   the given maximum size, the block will be written to the archive device,
   and the new data will begin a new block.

<P>
If no value is specified or zero is specified, the Storage daemon will
   use a default block size of 64,512 bytes (126 * 512).

<P>
The maximum <B>size-in-bytes</B> possible is 2,000,000.

<P>
</DD>
<DT><STRONG>Hardware End of Medium = <I>yesno</I></STRONG></DT>
<DD><A NAME="11728"></A>
   <A NAME="11729"></A>
   If <B>No</B>, the archive device is not required to support end of medium
   ioctl request, and the storage daemon will use the forward space file
   function to find the end of the recorded data. If <B>Yes</B>, the archive
   device must support the <TT>ioctl</TT> <TT>MTEOM</TT> call, which will position
   the tape to the end of the recorded data. In addition, your SCSI driver must
   keep track of the file number on the tape and report it back correctly by
   the <B>MTIOCGET</B> ioctl. Note, some SCSI drivers will correctly forward
   space to the end of the recorded data, but they do not keep track of the
   file number.  On Linux machines, the SCSI driver has a <B>fast-eod</B>
   option, which if set will cause the driver to lose track of the file
   number. You should ensure that this option is always turned off using the
   <B>mt</B> program.

<P>
Default setting for Hardware End of Medium is <B>Yes</B>. This  function is
   used before appending to a tape to ensure that no  previously written data is
   lost. We recommend if you have a non-standard or unusual tape drive that you
   use the <B>btape</B> program  to test your drive to see whether or not it
   supports this function.  All modern (after 1998) tape drives support this
   feature.  

<P>
</DD>
<DT><STRONG>Fast Forward Space File = <I>yesno</I></STRONG></DT>
<DD><A NAME="11740"></A>
   <A NAME="11741"></A>
   If <B>No</B>, the archive device is not required to support  keeping track of
   the file number (<B>MTIOCGET</B> ioctl) during  forward space file. If <B>   Yes</B>, the archive device must support  the <TT>ioctl</TT> <TT>MTFSF</TT> call, which
   virtually all drivers  support, but in addition, your SCSI driver must keep
   track of the  file number on the tape and report it back correctly by the 
   <B>MTIOCGET</B> ioctl. Note, some SCSI drivers will correctly  forward space,
   but they do not keep track of the file number or more  seriously, they do not
   report end of medium.  

<P>
Default setting for Fast Forward Space File is <B>Yes</B>.

<P>
</DD>
<DT><STRONG>Use MTIOCGET = <I>yesno</I></STRONG></DT>
<DD><A NAME="11750"></A>
   <A NAME="11751"></A>
   If <B>No</B>, the operating system is not required to support keeping track of
   the file number and reporting it in the (<B>MTIOCGET</B> ioctl). The default
   is <B>Yes</B>. If you must set this to No, Bacula will do the proper file
   position determination, but it is very unfortunate because it means that 
   tape movement is very inefficient.
   Fortunately, this operation system deficiency seems to be the case only
   on a few *BSD systems.  Operating systems known to work correctly are
   Solaris, Linux and FreeBSD.

<P>
</DD>
<DT><STRONG>BSF at EOM = <I>yesno</I></STRONG></DT>
<DD><A NAME="11756"></A>
   <A NAME="11757"></A>
   If <B>No</B>, the default, no special action is taken by Bacula with the End
   of Medium (end of tape) is reached because the tape will be positioned after
   the last EOF tape mark, and Bacula can append to the tape as desired.
   However, on some systems, such as FreeBSD, when Bacula reads the End of
   Medium (end of tape), the tape will be positioned after the second EOF tape
   mark (two successive EOF marks indicated End of Medium). If Bacula appends
   from that point, all the appended data will be lost. The solution for such
   systems is to specify <B>BSF at EOM</B> which causes Bacula to backspace over
   the second EOF mark. Determination of whether or not you need this directive
   is done using the <B>test</B> command in the <B>btape</B> program.

<P>
</DD>
<DT><STRONG>TWO EOF = <I>yesno</I></STRONG></DT>
<DD><A NAME="11763"></A>
   <A NAME="11764"></A>
   If <B>Yes</B>, Bacula will write two end of file marks when terminating a
   tape - i.e. after the last job or at the end of the medium. If <B>No</B>,
   the default, Bacula will only write one end of file to terminate the tape.

<P>
</DD>
<DT><STRONG>Backward Space Record = <I>yesno</I></STRONG></DT>
<DD><A NAME="11768"></A>
   <A NAME="11769"></A>
   If <I>Yes</I>, the archive device supports the <TT>MTBSR ioctl</TT> to backspace
   records. If <I>No</I>, this call is not used and the device must be rewound
   and advanced forward to the desired position. Default is <B>Yes</B> for non
   random-access devices. This function if enabled is used at the end of a
   Volume after writing the end of file and any ANSI/IBM labels to determine
   whether or not the last block was written correctly. If you turn this
   function off, the test will not be done. This causes no harm as the re-read
   process is precautionary rather than required.

<P>
</DD>
<DT><STRONG>Backward Space File = <I>yesno</I></STRONG></DT>
<DD><A NAME="11775"></A>
   <A NAME="11776"></A>
   If <I>Yes</I>, the archive device supports the <B>MTBSF</B> and  <B>MTBSF
  ioctl</B>s to backspace over an end of file mark and to the  start of a file. If
  <I>No</I>, these calls are not used and the  device must be rewound and
  advanced forward to the desired position.  Default is <B>Yes</B> for non
  random-access devices. 

<P>
</DD>
<DT><STRONG>Forward Space Record = <I>yesno</I></STRONG></DT>
<DD><A NAME="11783"></A>
   <A NAME="11784"></A>
   If <I>Yes</I>, the archive device must support the <B>MTFSR  ioctl</B> to
   forward space over records. If <B>No</B>, data must  be read in order to
   advance the position on the device. Default is  <B>Yes</B> for non
   random-access devices. 

<P>
</DD>
<DT><STRONG>Forward Space File = <I>yesno</I></STRONG></DT>
<DD><A NAME="11790"></A>
   <A NAME="11791"></A>
   If <B>Yes</B>, the archive device must support the <TT>MTFSF  ioctl</TT> to
   forward space by file marks. If <I>No</I>, data  must be read to advance the
   position on the device. Default is  <B>Yes</B> for non random-access devices. 

<P>
</DD>
<DT><STRONG>Offline On Unmount = <I>yesno</I></STRONG></DT>
<DD><A NAME="11797"></A>
   <A NAME="11798"></A>
   The default for this directive is <B>No</B>. If <B>Yes</B> the  archive device
   must support the <TT>MTOFFL ioctl</TT> to rewind and  take the volume offline. In
   this case, Bacula will issue the  offline (eject) request before closing the
   device during the <B>unmount</B>  command. If <B>No</B> Bacula will not attempt
   to offline the  device before unmounting it. After an offline is issued,  the
   cassette will be ejected thus <B>requiring operator intervention</B>  to
   continue, and on some systems require an explicit load command  to be issued
   (<B>mt -f /dev/xxx load</B>) before the system will recognize  the tape. If you
   are using an autochanger, some devices  require an offline to be issued prior
   to changing the volume. However,  most devices do not and may get very
   confused.  

<P>
If you are using a Linux 2.6 kernel or other OSes
   such as FreeBSD or Solaris, the Offline On Unmount will leave the drive
   with no tape, and Bacula will not be able to properly open the drive and
   may fail the job.  For more information on this problem, please see the
   description of Offline On UnmountNoTapeInDrive in the Tape
   Testing chapter.

<P>
</DD>
<DT><STRONG>Maximum Concurrent Jobs = number</STRONG></DT>
<DD><A NAME="11810"></A>
   <A NAME="11811"></A>
   <A NAME="11812"></A>
   where number is the maximum number of Jobs that can run
   concurrently on a specified Device.  Using this directive, it is possible
   to have different Jobs using multiple drives, because when 
   the Maximum Concurrent Jobs limit is
   reached, the Storage Daemon will start new Jobs on any other available
   compatible drive.  This facilitates writing to multiple drives with
   multiple Jobs that all use the same Pool.

<P>
</DD>
<DT><STRONG>Maximum Volume Size = <I>size</I></STRONG></DT>
<DD><A NAME="11816"></A>
   <A NAME="11817"></A>
   No more than <B>size</B> bytes will be written onto a given volume on the
   archive device.  This directive is used mainly in testing Bacula to
   simulate a small Volume.  It can also be useful if you wish to limit the
   size of a File Volume to say less than 2GB of data.  In some rare cases
   of really antiquated tape drives that do not properly indicate when the
   end of a tape is reached during writing (though I have read about such
   drives, I have never personally encountered one).  Please note, this
   directive is deprecated (being phased out) in favor of the <B>Maximum
   Volume Bytes</B> defined in the Director's configuration file.

<P>
</DD>
<DT><STRONG>Maximum File Size = <I>size</I></STRONG></DT>
<DD><A NAME="11821"></A>
   <A NAME="11822"></A>
   No more than <B>size</B> bytes will be written into a given logical file
   on the volume.  Once this size is reached, an end of file mark is
   written on the volume and subsequent data are written into the next
   file.  Breaking long sequences of data blocks with file marks permits
   quicker positioning to the start of a given stream of data and can
   improve recovery from read errors on the volume.  The default is one
   Gigabyte.  This directive creates EOF marks only on tape media.
   However, regardless of the medium type (tape, disk, DVD, ...) each time
   a the Maximum File Size is exceeded, a record is put into the catalog
   database that permits seeking to that position on the medium for
   restore operations. If you set this to a small value (e.g. 1MB),
   you will generate lots of database records (JobMedia) and may
   significantly increase CPU/disk overhead.

<P>
If you are configuring an LTO-3 or LTO-4 tape, you probably will
   want to set the <B>Maximum File Size</B> to 2GB to avoid making
   the drive stop to write an EOF mark.

<P>
Note, this directive does not limit the size of Volumes that Bacula
   will create regardless of whether they are tape or disk volumes. It
   changes only the number of EOF marks on a tape and the number of
   block positioning records (see below) that are generated. If you
   want to limit the size of all Volumes for a particular device, use
   the <B>Maximum Volume Size</B> directive (above), or use the
   <B>Maximum Volume Bytes</B> directive in the Director's Pool resource,
   which does the same thing but on a Pool (Volume) basis.

<P>
</DD>
<DT><STRONG>Block Positioning = <I>yesno</I></STRONG></DT>
<DD><A NAME="11828"></A>
   <A NAME="11829"></A>
   This directive tells Bacula not to use block positioning when doing restores.
   Turning this directive off can cause Bacula to be <B>extremely</B> slow
   when restoring files.  You might use this directive if you wrote your
   tapes with Bacula in variable block mode (the default), but your drive
   was in fixed block mode. The default is <B>yes</B>.

<P>
</DD>
<DT><STRONG>Maximum Network Buffer Size = <I>bytes</I></STRONG></DT>
<DD><A NAME="11833"></A>
   <A NAME="11834"></A>
   where <I>bytes</I> specifies the initial network buffer  size to use with the
   File daemon.  This size will be adjusted down if it is too large until
   it is accepted by the OS. Please use care in setting this value since if
   it is too large, it will be trimmed by 512 bytes until the OS is happy,
   which may require a large number of system calls.  The default value is
   32,768 bytes.

<P>
The default size was chosen to be relatively large but not too big in
   the case that you are transmitting data over Internet.  It is clear that
   on a high speed local network, you can increase this number and improve
   performance. For example, some users have found that if you use a value
   of 65,536 bytes they get five to ten times the throughput.  Larger values for
   most users don't seem to improve performance. If you are interested
   in improving your backup speeds, this is definitely a place to
   experiment. You will probably also want to make the corresponding change
   in each of your File daemons conf files.

<P>
</DD>
<DT><STRONG>Maximum Spool Size = <I>bytes</I></STRONG></DT>
<DD><A NAME="11837"></A>
   <A NAME="11838"></A>
   where the bytes specify the maximum spool size for all jobs that are
   running.  The default is no limit.

<P>
</DD>
<DT><STRONG>Maximum Job Spool Size = <I>bytes</I></STRONG></DT>
<DD><A NAME="11840"></A>
   <A NAME="11841"></A>
   where the bytes specify the maximum spool size for any one job  that is
   running. The default is no limit. 
   This directive is implemented only in version 1.37 and later.

<P>
</DD>
<DT><STRONG>Spool Directory = <I>directory</I></STRONG></DT>
<DD><A NAME="11843"></A>
   <A NAME="11844"></A>
   specifies the name of the directory to be used to store  the spool files for
   this device. This directory is also used to store  temporary part files when
   writing to a device that requires mount (DVD).  The default is to use the
   working directory. 

<P>
</DD>
<DT><STRONG>Maximum Part Size = <I>bytes</I></STRONG></DT>
<DD><A NAME="11846"></A>
   <A NAME="11847"></A>
   This is the maximum size of a volume part file. The default is no limit.
   This directive is implemented only in version 1.37 and later.

<P>
If the device requires  mount, it is transferred to the device when this size
   is reached.  In this case, you must take care to have enough disk space left
   in  the spool directory.  

<P>
Otherwise, it is left on the hard disk.  

<P>
It is ignored for tape and FIFO devices.  

<P>
</DD>
</DL>

<P>
<A NAME="mountcodes"></A>
<H1><A NAME="SECTION002040000000000000000">
Edit Codes for Mount and Unmount Directives</A>
</H1> 
<A NAME="11851"></A>
<A NAME="11852"></A>

<P>
Before submitting the <B>Mount Command</B>, <B>Unmount Command</B>, 
<B>Write Part Command</B>, or <B>Free Space Command</B> directives 
to the operating system, Bacula performs character substitution of the
following characters:

<P>
<PRE>
    %% = %
    %a = Archive device name
    %e = erase (set if cannot mount and first part)
    %n = part number
    %m = mount point
    %v = last part name (i.e. filename)
</PRE>
<P>

<H1><A NAME="SECTION002050000000000000000">
Devices that require a mount (DVD)</A>
</H1>
<A NAME="11860"></A>
<A NAME="11861"></A>

<P>
All the directives in this section are implemented only in
Bacula version 1.37 and later and hence are available in version 1.38.6.

<P>
As of version 1.39.5, the directives
"Requires Mount", "Mount Point", "Mount Command", and "Unmount Command"
apply to removable filesystems such as USB in addition to DVD.

<P>
<DL>
<DT><STRONG>Requires Mount = <I>yesno</I></STRONG></DT>
<DD><A NAME="11864"></A>
   <A NAME="11865"></A>
   You must set this directive to <B>yes</B> for DVD-writers,  and to <B>no</B> for
   all other devices (tapes/files).  This directive indicates if the device
   requires to be mounted to be read,  and if it must be written in a special way.
   If it set, <B>Mount Point</B>,  <B>Mount Command</B>, <B>Unmount Command</B> and
   <B>Write Part Command</B>  directives must also be defined. 

<P>
</DD>
<DT><STRONG>Mount Point = <I>directory</I></STRONG></DT>
<DD><A NAME="11873"></A>
   <A NAME="11874"></A>
   Directory where the device can be mounted. 

<P>
</DD>
<DT><STRONG>Mount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11876"></A>
   <A NAME="11877"></A>
   Command that must be executed to mount the device. Before the command is 
   executed, %a is replaced with the Archive Device, and %m with the Mount 
   Point.

<P>
Most frequently, you will define it as follows:  

<P>
<PRE>
  Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
</PRE>
<P>
For some media, you may need multiple commands.  If so, it is recommended
that you use a shell script instead of putting them all into the Mount
Command.  For example, instead of this:

<P>
<PRE>
  Mount Command = "/usr/local/bin/mymount"
</PRE>
<P>
Where that script contains:

<P>
<PRE>
#!/bin/sh
ndasadmin enable -s 1 -o w
sleep 2
mount /dev/ndas-00323794-0p1 /backup
</PRE>
<P>
Similar consideration should be given to all other Command parameters.

<P>
</DD>
<DT><STRONG>Unmount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11885"></A>
   <A NAME="11886"></A>
   Command that must be executed to unmount the device. Before the command  is
   executed, %a is replaced with the Archive Device, and %m with the  Mount
   Point.

<P>
Most frequently, you will define it as follows:  

<P>
<PRE>
  Unmount Command = "/bin/umount %m"
</PRE>
<P>
If you need to specify multiple commands, create a shell script.

<P>
</DD>
<DT><STRONG>Write Part Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11890"></A>
   <A NAME="11891"></A>
   Command that must be executed to write a part to the device. Before the 
   command is executed, %a is replaced with the Archive Device, %m with the 
   Mount Point, %e is replaced with 1 if we are writing the first part,
   and with 0 otherwise, and %v with the current part filename.

<P>
For a DVD, you will most frequently specify the Bacula supplied  <B>   dvd-handler</B> script as follows:  

<P>
<PRE>
  Write Part Command = "/path/dvd-handler %a write %e %v"
</PRE>
<P>
Where <B>/path</B> is the path to your scripts install directory, and
  dvd-handler is the Bacula supplied script file.  
  This command will already be present, but commented out,
  in the default bacula-sd.conf file. To use it, simply remove
  the comment (#) symbol.

<P>
If you need to specify multiple commands, create a shell script.

<P>
</DD>
<DT><STRONG>Free Space Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="11897"></A>
   <A NAME="11898"></A>
   Command that must be executed to check how much free space is left on the 
   device. Before the command is executed,%a is replaced with the Archive
   Device, %m with the Mount Point, %e is replaced with 1 if we are writing
   the first part, and with 0 otherwise, and %v with the current part filename.

<P>
For a DVD, you will most frequently specify the Bacula supplied  <B>   dvd-handler</B> script as follows:  

<P>
<PRE>
  Free Space Command = "/path/dvd-handler %a free"
</PRE>
<P>
Where <B>/path</B> is the path to your scripts install directory, and
  dvd-handler is the Bacula supplied script file.
  If you want to specify your own command, please look at the code of
  dvd-handler to see what output Bacula expects from this command.
  This command will already be present, but commented out,
  in the default bacula-sd.conf file. To use it, simply remove
  the comment (#) symbol.

<P>
If you do not set it, Bacula will expect there is always free space on the
  device. 

<P>
If you need to specify multiple commands, create a shell script.

<P>
</DD>
</DL>

<P>
<A NAME="AutochangerRes"></A><A NAME="AutochangerResource1"></A><HR>
<!--Navigation Panel-->
<A NAME="tex2html1502"
  HREF="Autochanger_Resource.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1496"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1490"
  HREF="Client_File_daemon_Configur.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1498"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1500"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1503"
  HREF="Autochanger_Resource.html">Autochanger Resource</A>
<B> Up:</B> <A NAME="tex2html1497"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1491"
  HREF="Client_File_daemon_Configur.html">Client/File daemon Configuration</A>
 &nbsp; <B>  <A NAME="tex2html1499"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1501"
  HREF="Thanks.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>