]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual/tapetesting.tex
Update
[bacula/docs] / docs / manual / tapetesting.tex
index 875ace8f6d3ef960c1c2d9ee8defd3ee3632792d..0988b28ae263fbd7cfdfc650d9b5e9cf1a370e16 100644 (file)
@@ -60,8 +60,10 @@ an autochanger, please be sure to read the
    will automatically use it. If you do  not have it configured, you can manually
    issue the appopriate  {\bf mtx} command, or press the autochanger buttons to
    change  the tape when requested to do so. 
-\item FreeBSD users, run the {\bf tapetest} program, and make  sure your
-   system is patched if necessary. See below for more  details. 
+\item FreeBSD users, if you have a pre-5.0 system run the {\bf tapetest}
+   program, and make sure your system is patched if necessary. The tapetest
+   program can be found in the platform/freebsd directory. The instructions
+   for its use are at the top of the file.
 \item Run Bacula, and backup a reasonably small directory,  say 60 Megabytes.
    Do three successive backups of this  directory. 
 \item Stop Bacula, then restart it. Do another full backup  of the same
@@ -129,8 +131,6 @@ failures, you can also increase the {\bf Maximum Open Wait} time interval,
 which will give you more time to mount the next tape before the job is
 failed.
 
-
-
 \subsubsection*{Specifying the Configuration File}
 \index[general]{File!Specifying the Configuration}
 \index[general]{Specifying the Configuration File}
@@ -157,8 +157,17 @@ tape, this is the physical device name such as {\bf /dev/nst0} or {\bf
 directive. For the program to work, it must find the identical name in the
 Device resource of the configuration file. If the name is not found in the
 list of phsical names, the utility program will compare the name you entered
-to the Device names (rather than the Archive device names). See below for
-specifying Volume names. 
+to the Device names (rather than the Archive device names). 
+
+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
+{\bf b} in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is
+what is needed in this case.  Bacula does not support SysV tape drive
+behavior.
+
+See below for specifying Volume names. 
 
 \subsubsection*{Specifying a Device Name For a File}
 \index[general]{File!Specifying a Device Name For a}
@@ -306,7 +315,12 @@ Got EOF on tape.
 \normalsize
 
 then almost certainly, you are running your drive in fixed block mode rather
-than variable block mode. Please see below for help on resolving that. 
+than variable block mode. See below for more help of resolving fix
+versus variable block problems.
+
+It is also possible that you have your drive
+set in SysV tape drive mode. The drive must use BSD tape conventions.
+See the section above on setting your {\bf Archive device} correctly.
 
 For FreeBSD users, please see the notes below for doing further testing of
 your tape drive. 
@@ -427,7 +441,7 @@ There are two possible solutions.
 \item The first and  best is to always ensure that your drive is in  variable
    block mode. Note, it can switch back to  fixed block mode on a reboot or if
    another program  uses the drive. So on such systems you  need to modify the
-Bacula startup files  to explicitly set: 
+   Bacula startup files  to explicitly set: 
 
 \footnotesize
 \begin{verbatim}
@@ -535,7 +549,6 @@ medium, and Bacula will keep  track of the file number itself.
 \end{itemize}
 
 \label{IncorrectBlocks}
-
 \subsubsection*{Incorrect Number of Blocks or Positioning Errors during btape
 Testing}
 \index[general]{Testing!Incorrect Number of Blocks or Positioning Errors
@@ -628,6 +641,8 @@ behavior. On systems other than Linux, you will need to consult your {\bf mt}
 man pages or documentation to figure out how to do the same thing. This should
 not really be necessary though -- for example, on both Linux and Solaris
 systems, the default tape driver options are compatible with Bacula. 
+On Solaris systems, you must take care to specify the correct device
+name on the {\bf Archive device} directive. See above for more details.
 
 You may also want to ensure that no prior program has set the default block
 size, as happened to one user, by explicitly turning it off with: 
@@ -730,25 +745,28 @@ is non-zero and hence set for a particular block size. Bacula is not likely to
 work in such a situation because it will normally attempt to write blocks of
 64,512 bytes, except the last block of the job which will generally be
 shorter. The first thing to try is setting the default block size to zero
-using the {\bf mt \ -f \ /dev/nst0 \ defblksize \ 0} command as shown above.
-On FreeBSD, this would be something like: {\bf mt \ -f \ /dev/nsa0 \ blocksize
-\ 0}. 
+using the {\bf mt -f /dev/nst0 defblksize 0} command as shown above.
+On FreeBSD, this would be something like: {\bf mt -f /dev/nsa0 blocksize 0}. 
 
 On some operating systems with some tape drives, the amount of data that
 can be written to the tape and whether or not compression is enabled is
-determined by the density usually the {\bf mt \ -f \ /dev/nst0 setdensity xxx} command.
-Often  {\bf mt \ -f \ /dev/nst0 \ status} will print out the current
+determined by the density usually the {\bf mt -f /dev/nst0 setdensity xxx} command.
+Often  {\bf mt -f /dev/nst0 status} will print out the current
 density code that is used with the drive.  Most systems, but unfortunately
 not all, set the density to the maximum by default. On some systems, you
 can also get a list of all available density codes with:
-{\bf mt \ -f \ /dev/nst0 \  densities} or a similar {\bf mt} command.
+{\bf mt -f /dev/nst0 densities} or a similar {\bf mt} command.
 Note, for DLT and SDLT devices, no-compression versus compression is very 
 often controlled by the density code.  On FreeBSD systems, the compression
-mode is set using {\bf mt \ -f \ /dev/nsa0 \ comp xxx} where xxx is the
+mode is set using {\bf mt -f /dev/nsa0 comp xxx} where xxx is the
 mode you want.  In general, see {\bf man mt}  for the options available on
 your system.
 
-
+Note, some of the above {\bf mt} commands may not be persistent depending
+on your system configuration. That is they may be reset if a program  
+other than Bacula uses the drive or, as is frequently the case, on reboot
+of your system.
+                   
 If your tape drive requires fixed block sizes (very unusual), you can use the
 following records: 
 
@@ -784,14 +802,16 @@ with:
 
 \footnotesize
 \begin{verbatim}
-mt \  -f \  /dev/nsa0 \  seteotmodel \  2
-mt \  -f \  /dev/nsa0 \  blocksize \  0
-mt \  -f \ /dev/nsa0 \  comp \  enable
+mt  -f  /dev/nsa0  seteotmodel  2
+mt  -f  /dev/nsa0  blocksize   0
+mt  -f  /dev/nsa0  comp  enable
 \end{verbatim}
 \normalsize
 
 You might want to put those commands in a startup script to make sure your
-tape driver is properly initialized before running Bacula. 
+tape driver is properly initialized before running Bacula, because
+depending on your system configuration, these modes may be reset if a      
+program other than Bacula uses the drive or when your system is rebooted.
 
 Then according to what the {\bf btape test} command returns, you will probably
 need to set the following (see below for an alternative): 
@@ -824,9 +844,9 @@ the correct values to use are:
 
 \footnotesize
 \begin{verbatim}
-mt \  -f \  /dev/nsa0 \  seteotmodel \  1
-mt \  -f \  /dev/nsa0 \  blocksize \  0
-mt \  -f \ /dev/nsa0 \  comp \  enable
+mt  -f  /dev/nsa0  seteotmodel  1
+mt  -f  /dev/nsa0  blocksize  0
+mt  -f /dev/nsa0  comp  enable
 \end{verbatim}
 \normalsize
 
@@ -1105,8 +1125,9 @@ certain tape modes and MTEOM.
   skipped.  File number is always tracked for MTEOM.
 
   Linux does support both SCSI SPACE Filemarks and End-of-data: When MTEOM
-  is called in MT_ST_FAST_MTEOM mode, SCSI SPACE Filemarks with count =
-  8388607 is used.  In the other case, SCSI SPACE End-of-data is used.
+  is called in MT_ST_FAST_MTEOM mode, SCSI SPACE End-of-data is used.
+  In the other case, SCSI SPACE Filemarks with count =
+  8388607 is used.  
   There is no real slow mode like in Solaris - I just expect, that for
   older tape drives Filemarks may be slower than End-of-data, but not so
   much as in Solaris slow mode.  File number is tracked for MTEOM just
@@ -1115,7 +1136,7 @@ certain tape modes and MTEOM.
   FreeBSD does support both SCSI SPACE Filemarks and End-of-data, but when
   MTEOD (MTEOM) is called, SCSI SPACE End-of-data is always used.  FreeBSD
   never use SCSI SPACE Filemarks for MTEOD. File number is never tracked
-  for MTOED.
+  for MTEOD.
 
 \item[Bacula level]
   When {\bf Hardware End of Medium = Yes} is used, MTEOM is called, but it
@@ -1134,20 +1155,14 @@ certain tape modes and MTEOM.
 
   If I use No, an action depends on Fast Forward Space File.
 
-  Considering {\bf Hardware End of Medium = no}
+  When I set {\bf Hardware End of Medium = no}
   and {\bf Fast Forward Space File = no}
-  When I set the two to no, file positioning was very slow
-  on my LTO-3:
-\begin{verbatim}
-  HEOM = no, FFSF = no:  ~ 10 - 100 minutes
-\end{verbatime}
+  file positioning was very slow
+  on my LTO-3 (about 10 to 100 minutes), but
 
-while even with {\bf Hardware End of Medium = no} but
+  with {\bf Hardware End of Medium = no} and
 {\bf Fast Forward Space File = yes}, the time is 10 to
-100 times faster.
-\begin{verbatim}
-  HEOM = no, FFSF = yes: ~ 1 minute
-\end{verbatim}
+100 times faster (about 1 to 2 minutes).
 
 \end{description}