Bacula-users

[Bacula-users] Bacula Loading Tape at the Wrong Library

2014-08-07 12:45:06
Subject: [Bacula-users] Bacula Loading Tape at the Wrong Library
From: Vinicius Alexandre Pereira de Souza <vinicius.apsouza AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 7 Aug 2014 13:39:02 -0300

Hello everybody,

I'm new to Bacula, and i'm having a problem using different storages in a same pool.

I have two HP Tape Libraries installed on the Storage (LibHP08 and LibHP09), i tried to configure some jobs to access both libraries, but I'm having some trouble with bacula accessing the wrong library.

For example, bacula tries to access volume "G00022L5" on slot 20 at LibHP08, but it reaches the volume "H00011L5" on slot 20 at LibHP09. Basically, it tries to get a tape on the correct slot, but in the wrong Library. It Generates the Following error:

LibHP 3307 Issuing autochanger "unload slot 20, drive 1" command.
 Warning: Director wanted Volume "G00022L5".
    Current Volume "H00011L5" not acceptable because:
    1998 Volume "H00011L5" catalog status is Append, not in Pool.

Then, bacula unloads the drive, tries to find the correct tape, but loads the wrong one, generates the error again, and so on.

The job never completes, since it doesn't find the correct tape.

Some of my Pools:

Pool {
  Name = machine-Pool-Weekly
  Pool Type = Backup
  Storage = LibHP08, LibHP09
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 34 days
}

Pool {
  Name = machine-Pool-Monthly
  Pool Type = Backup
  Storage = LibHP08, LibHP09
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1825 days
}


Devices/Autochangers Config:

#
## An autochanger device with four drives
##  Library HP (LibHP08)
##
Autochanger {
  Name = LibHP08_Changer
  Device = LibHP08-drive_1, LibHP08-drive_2, LibHP08-drive_3, LibHP08-drive_4
  Changer Command = "/usr/lib64/bacula/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/tape/by-id/scsi-35001438016063c04
}

#
## An autochanger device with four drives
##  Library HP (LibHP09)
##
Autochanger {
  Name = LibHP09_Changer
  Device = LibHP09-drive_1, LibHP09-drive_2, LibHP09-drive_3, LibHP09-drive_4
  Changer Command = "/usr/lib64/bacula/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/tape/by-id/scsi-3500143801606395c
}

Device {
  Name = LibHP08-drive_1                      #
  Drive Index = 0
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063c05-nst 
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP08-drive_2                      #
  Drive Index = 1
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063c08-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP08-drive_3                      #
  Drive Index = 2
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063c0b-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP08-drive_4                      #
  Drive Index = 3
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063c0e-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP09-drive_1                      #
  Drive Index = 0
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-3500143801606395d-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP09-drive_2                      #
  Drive Index = 1
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063960-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP09-drive_3                      #
  Drive Index = 2
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063963-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Device {
  Name = LibHP09-drive_4                      #
  Drive Index = 3
  Media Type = LTO-5
  Archive Device = /dev/tape/by-id/scsi-35001438016063966-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = yes
  Alert Command = "sh -c 'smartctl -H -l error %c'"  
  Maximum Changer Wait = 600
  Maximum Concurrent Jobs = 1
  LabelMedia = yes
}

Storage config:

Storage { 
  Name = LibHP08
  Address = sd-host 
  SDPort = 9103 
  Password = "myPassword"
  Device = LibHP08_Changer
  Media Type = LTO-5 
  Autochanger = yes
  Maximum Concurrent Jobs = 4
} 

Storage { 
  Name = LibHP09
  Address = sd-host 
  SDPort = 9103 
  Password = "myPassword"
  Device = LibHP09_Changer
  Media Type = LTO-5 
  Autochanger = yes
  Maximum Concurrent Jobs = 4
} 

At bconsole, i executed the following:

update slots

There was some tapes at the wrong place, it updated the catalog, but the error persists.

I'm Currently using Bacula v5.2.12, I've installed the Director and the Storage on different machines, both of them communicating with no problems

Any ideas?


I also created a question at Serverfault:

http://serverfault.com/questions/618720/


Thanks in advance!

--
Att,
Vinicius Alexandre Pereira de Souza

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>