Bacula-users

Re: [Bacula-users] Configuring a fake autochanger for a standalone tape drive in 9.0.2

2017-08-01 15:16:10
Subject: Re: [Bacula-users] Configuring a fake autochanger for a standalone tape drive in 9.0.2
From: Kern Sibbald <kern AT sibbald DOT com>
To: Phil Stracchino <phils AT caerllewys DOT net>, bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 1 Aug 2017 21:14:46 +0200
Hello Phil,

There should be no difference in how Bacula handles tapes between 7.4.7 and 9.0.x. If there is I would suggest that you carefully document it in a way that I can "see" the problem and easily reproduce it so that I can fix it. mtx-changer will *not* work unless you have an autochanger. There is no fake autochanger for tapes. There are two types of "fake" autochangers for Disks. The first one is something like mhvtl that is a program that simulates in detail and autochanger. The second is the Bacula virtual disk autochanger.

If you have a real stand-alone tape drive, I personally know of no way to make it work with mtx, and if Bacula does not work with it, I will be happy to work on fixing it, but only if it is clearly documented in a detailed but very concise way.

The Bacula virtual disk autochanger and certain other cases are very nicely documented in several of the white papers that are on www.bacula.org.

Best regards,

Kern


On 08/01/2017 08:44 PM, Phil Stracchino wrote:
I've just upgraded from Bacula 7.4.7, in which my standalone LTO4 tape
drive worked perfectly, to Bacula 9.0.2, in which it doesn't.  In 9.0.2,
I had to use the workaround of setting up a fake autochanger with one drive.

The problem is that this trick is not documented, and I had to largely
figure it out by trial and error and reference to outdated documentation
that doesn't address the fake-autochanger case anyway.  The mtx-changer
command is just copied directly from a standard changer invocation, and
Changer Device is a total guess - it's the generic SCSI device
corresponding to the tape drive.  I don't know if it's right, wrong, or
unneeded, or what to use in its place.  I also don't know whether any of
the directives in the Device description are obsolete or not needed any
more.



Here's the configuration in my Director:

Storage {
   Name = babylon5-sd
   Address = babylon5.babcom.com
   SDPort = 9103
   Password = "********************"
   Device = babylon5-changer
   Media Type = LTO-4
   Maximum Concurrent Jobs = 20
   Autochanger = yes
}


And on the relevant Storage:

Autochanger {
   Name = babylon5-changer
   Device = LTO-4
   Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
   Changer Device = /dev/sg5    # this is largely a guess
}

Device {
   Name = LTO-4
   Media Type = LTO-4
   Archive Device = /dev/nst0
   Drive Index = 0              # pretend
   Autochanger = yes            # pretend
   AutomaticMount = yes         # when device opened, read it
   AlwaysOpen = yes
   OfflineOnUnmount = yes
   RemovableMedia = yes
   RandomAccess = no
   Maximum File Size = 5GB
   Maximum Block Size = 2048000
   Spool Directory = /var/tmp/bacula
   Maximum Spool Size = 10GB
   Maximum Job Spool Size = 5GB
}


Now, this *WORKS.*  But it throws non-fatal mtx-changer errors like this:


01-Aug 14:11 minbar-dir JobId 14328: BeforeJob: Client babylon5 has address
+10.24.32.10
01-Aug 14:11 minbar-dir JobId 14328: Start Backup JobId 14328,
+Job=Babylon5_Backup.2017-08-01_14.11.23_04
01-Aug 14:11 minbar-dir JobId 14328: Using Device "LTO-4" to write.
01-Aug 14:11 babylon5-sd JobId 14328: No slot defined in catalog
(slot=0) for Volume
+"LTO4-FULL-0024" on "LTO-4" (/dev/nst0).
01-Aug 14:11 babylon5-sd JobId 14328: Cartridge change or "update slots"
may be
+required.
01-Aug 14:11 babylon5-sd JobId 14328: 3991 Bad autochanger "loaded? drive 0"
+command: ERR=Child exited with code 1.
Results=mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 20
mtx: Request Sense: Additional Sense Qualifier = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
READ ELEMENT STATUS Command Failed

01-Aug 14:11 babylon5-sd JobId 14328: Recycled volume "LTO4-FULL-0007"
on Tape
+device "LTO-4" (/dev/nst0), all previous data lost.


I get similar errors from mounting and unmounting volumes.  Clearly
mtx-changer is really not on board with this whole "fake autochanger'
thing.  Does anyone know what changes I should make to eliminate these
errors?  Is there a specific way to configure mtx-changer for the "fake
autochanger" case?  Should I be even using a Changer Command at all if
there is no Changer?





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


ADSM.ORG Privacy and Data Security by https://kimlaw.us