>>>>> On Fri, 1 Jun 2007 10:04:48 -0700, velociraptor  said:
> 
> I'm having a weird problem with my tests of bacula for our install.
> 
> For the most part everything was going well--my autochanger tests fine
> using btape as do the individual tapes drives, basic job defs, clients
> on two different OSes (Gentoo & RHEL AS 4), etc.  My director's OS is
> Gentoo 2.6.20-gentoo-r8 using unmasked Bacula 2.0.3.
> 
> In trying to get both tape drives to work without logically
> partitioning my tape library, I read in the archives that I needed to
> configure job definitions to use the autochanger rather than tape
> drives (which wasn't clear from the docs btw) in the director config,
> and also to have autochanger and tape drive entries for each drive in
> the sd config.
> 
> So I did that, but now I am getting an error where the test backups won't run:
> 
> 31-May 18:17 backup01-sd: monitor1-fd.2007-05-31_18.17.00 Fatal error:
>      Device "LTOdrv-2" with MediaType "LTO Autochanger" requested by
> DIR not found in SD Device resources.
> 31-May 18:17 backup01-dir: monitor1-fd.2007-05-31_18.17.00 Fatal error:
>      Storage daemon didn't accept Device "LTOdrv-2" because:
>      3924 Device "LTOdrv-2" not in SD Device resources.
> 
> However, both drives *are* in the SD resources and bacula-sd has been
> restarted (several) times since it was added (e.g. the conf file
> syntax is correct).
> 
> Here are my SD config stanzas:
> 
> Autochanger {
>   Name = DellTL4000
>   Description = "Dell TL4000 Tape Library"
>   Device = LTOdrv-1, LTOdrv-2
>   Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/sg2
> 
> }
> 
> Device {
>   Name = LTOdrv-1                      #
>   Drive Index = 0
>   Media Type = LTO-3
>   Archive Device = /dev/nst0
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
>   Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/sg2
>   AutoChanger = yes
>   Maximum Spool Size = 32212254720
>   Spool Directory = /bacula_tmp
>   Alert Command = "sh -c 'smartctl -H -l error %c'"
> }
> 
> Device {
>   Name = LTOdrv-2
>   Drive Index = 1
>   Media Type = LTO-3
>   Archive Device = /dev/nst1
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
>   Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/sg2
>   AutoChanger = yes
>   Maximum Spool Size = 32212254720
>   Spool Directory = /bacula_tmp
>   Alert Command = "sh -c 'smartctl -H -l error %c'"
> }
> 
> Definitions from bacula-dir:
> 
> JobDefs {
>   Name = "DefaultJob"
>   Type = Backup
>   Level = Incremental
>   FileSet = "Gentoo Full Set"
>   Schedule = "WeeklyCycle"
>   Storage = DellTL4000
>   SpoolData = yes
>   Messages = Standard
>   Pool = Default
>   Priority = 10
> }
> 
> Storage {
>   Name = DellTL4000
>   Description = "Dell TL4000 Tape Library"
>   Address = 10.1.1.100               # N.B. Use a fully qualified name here
>   SDPort = 9103
>   MediaType = "LTO Autochanger"
>   Device = LTOdrv-1, LTOdrv-2
>   Autochanger = yes
>   Password = "md5_hash"  # passwd for Storage daemon
> }
> 
> Storage {
>   Name = LTOdrv-1
>   Address = 10.1.1.100               # N.B. Use a fully qualified name here
>   SDPort = 9103
>   Password = "md5_hash"  # passwd for Storage daemon
>   Device = LTOdrv-1              # must be same as Device in Storage daemon
>   Media Type = LTO-3          # must be same as MediaType in Storage daemon
>   Autochanger = yes           # enable for autochanger device
> }
> 
> Storage {
>   Name = LTOdrv-2
>   Address = 10.1.1.100               # N.B. Use a fully qualified name here
>   SDPort = 9103
>   Password = "md5_hash"  # passwd for Storage daemon
>   Device = LTOdrv-2              # must be same as Device in Storage daemon
>   Media Type = LTO-3          # must be same as MediaType in Storage daemon
>   Autochanger = yes           # enable for autochanger device
> }
> 
> ====
> I've tried "Device = LTOdrv-1, LTOdrv-2" as well as one "Device =
> tape_name" for each.  There's no weird characters in the conf files.
> 
> Any suggestions?  I can santize and post up my full conf files to
> pastebin if folks would like to look at the whole shebang.
> 
> Also, I found that where bacula-dir *requires* a "MediaType" entry for
> the autochanger's Storage stanza, the "Autochanger" stanza in
> bacula-sd throws an error if you include a MediaType entry and the
> storage daemon will not start.  This is an inconsistancy IMO, and
> directly conflicts with the documentation as far as I have been able
> to find (I haven't exhaustively read the documentation, but think I've
> covered the most pertinent portions).
> 
> I appreciate any suggestions from folks, as testing was going well
> using just one tape drive and no autochanger definition.

I think Ryan is right about needing MediaType=LTO-3 in the bacula-dir Storage
resource.

Also I think you need to set bacula-dir Storage Device to DellTL4000 i.e. "the
Name directive contained in the Autochanger resource"
(http://www.bacula.org/rel-manual/FileSet_Resource.html#6508).

__Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to