我有两个惠普磁带库安装在存储(LibHP08和LibHP09),我试图configuration一些工作,以访问这两个库,但我有一些麻烦访问错误的图书馆bacula。
例如,bacula尝试访问LibHP08上的20号插槽上的卷“G00022L5”,但在LibHP09上达到20号插槽上的卷“H00011L5”。 基本上,它试图在正确的插槽上获取磁带,但在错误的库中。 它会产生以下错误:
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.
然后,bacula卸载驱动器,试图find正确的磁带,但加载错误的,再次产生错误,等等。
工作从来没有完成,因为它没有find正确的磁带。
我的一些游泳池:
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 }
编辑:更新与存储和设备/ Autochangerconfiguration
设备/自动转换器configuration:
# ## 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 }
存储configuration:
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 }
在bconsole,我执行以下操作:
update slots
有一些磁带在错误的地方,它更新了目录,但错误仍然存在。
我目前正在使用Bacula v5.2.12,我在不同的机器上安装了Director和Storage,两者都没有问题
编辑:我在postgresql上执行以下sqls:
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;
我的两个磁带库应该有48个磁带,但是在运行sql之后,我注意到一个lib有51个磁带,另一个有45个,在再次运行“更新槽”之后,有3个磁带被重新分配到每个库中。
显然,运行作业的简单事实已经使postgresql中的磁带混乱了。
我的postgresql版本是:
postgresql-server.x86_64 8.4.13-1.el6_3
有任何想法吗?