Bacula carregando fita na biblioteca errada

2

Eu tenho duas Bibliotecas de Fita HP instaladas no Armazenamento (LibHP08 e LibHP09), tentei configurar algumas tarefas para acessar ambas as bibliotecas, mas estou tendo alguns problemas com o bacula acessando a biblioteca errada.

Por exemplo, o bacula tenta acessar o volume "G00022L5" no slot 20 em LibHP08, mas atinge o volume "H00011L5" no slot 20 em LibHP09. Basicamente, ele tenta obter uma fita no slot correto, mas na biblioteca errada. Gera o seguinte erro:

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.

Então, o bacula descarrega o drive, tenta encontrar a fita correta, mas carrega o errado, gera o erro novamente, e assim por diante.

O trabalho nunca é concluído, pois não encontra a fita correta.

Alguns dos meus 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
}

Editar: Atualizado com configuração de Armazenamento e Dispositivo / Autochanger

Configuração de dispositivos / autochangers:

#
## 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
}

Configuração de armazenamento:

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
} 

No bconsole, eu executei o seguinte:

update slots

Houve algumas fitas no local errado, atualizou o catálogo, mas o erro persiste.

Atualmente estou usando o Bacula v5.2.12, eu instalei o Director e o Storage em diferentes máquinas, ambos se comunicando sem problemas

Edit: Eu executei os seguintes sqls no 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;

Ambas as minhas bibliotecas devem ter 48 fitas, mas depois de executar o sql, notei que uma lib tinha 51 fitas e a outra 45, depois de executar novamente "update slots", havia 3 fitas que foram realocadas em cada lib .

Aparentemente, o simples fato de executar um trabalho desorganizou as fitas no postgresql.

Minha versão do postgresql é:

postgresql-server.x86_64           8.4.13-1.el6_3

Alguma idéia?

    
por Vinicius Souza 07.08.2014 / 15:43

0 respostas