2

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
}

Edit: Updated with Storage and Device/Autochanger config

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

Edit: I executed the following sqls on postgresql:

    select mediaid, volumename, slot, poolid, storageid, deviceid from media where storageid=2 order by volumename;
    select mediaid, volumename, slot, poolid, storageid, deviceid from media where storageid=1 order by volumename;

Both of my libraries should have 48 tapes, but after running the sql, i noticed that one lib had 51 tapes and the other one 45, after running again "update slots", there were 3 tape which were relocated in each lib.

Apparently, the simple fact of running a job have disorganized the tapes in postgresql.

My postgresql version is:

postgresql-server.x86_64           8.4.13-1.el6_3

Any ideas?

  • It looks very much as if there is some confusion about which Storage is which, particularly in terms of robot and drive. Could we see the Storage definitions as well? – MadHatter Aug 7 '14 at 14:37
  • Oh well, that disposes of that idea; assuming all those device files really do correspond to the relevant drives in the relevant stackers, they look fine. You may have hit a genuine bug in bacula, in which case you might get better luck on the bacula-users list than here. Sorry not to be more help. – MadHatter Aug 7 '14 at 14:57
  • You could try using mtx status to query for the list of tapes available through each of the two device inodes to sanity check your configuration. – kasperd Aug 7 '14 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.