I’m also running into this issue.
In my case, I’ve setup a disk-based auto-changer (vchanger) with two pools: Full and Weekly. Each pool has multiple drives with 8 volumes on each drive. The script that mounts the disk also issues an “update slots” command in bconsole, and I can verify that bacula sees the correct volumes as “InChanger”.
When I swap out disks (weekly), Bacula continues to look for volumes that were append-able, but on the previous disk (and not currently marked as “InChanger”) and refuses to write to the append-able volumes on the new disk that are marked as “InChanger”. It marks all the previous volumes it cannot access as “Error”, and only then will it begin writing to the currently loaded volumes.
This line from the “Recycling Algorithm” led me to believe that it would use a volume that was InChanger first: "If the request is for an Autochanger device, look only for Volumes in the Autochanger (i.e. with InChanger set and that have the correct Storage device).”
But it seems I’m missing something. I’ve included relevant bits from my bacula-dir.conf file if anyone can see what I’m doing wrong. I’m getting this on two systems, one running Bacula 5.2.12 and one running 7.0.4.
My other option is to split these all into separate pools, but that’s going to make scheduling much harder.
Thanks in advance! -Joe Rhodes
# Definition of file Virtual Autochanger device
Storage { Name = removeable-drives Address = 10.11.1.2 SDPort = 9103 Password = “password" Device = ExternalDrives Media Type = File Maximum Concurrent Jobs = 1 }
# Pools Pool { Name = FullSet Pool Type = Backup Recycle = yes AutoPrune = yes Volume Use Duration = 1 week #We're on an 2 month rotation VolumeRetention = 58 days Maximum Volumes = 32 # 4 drives with 8 volumes on each Storage = removeable-drives }
Pool { Name = Weekly Pool Type = Backup Recycle = yes AutoPrune = yes Volume Use Duration = 1 week VolumeRetention = 3 weeks Maximum Volumes = 40 # 5 drives with 8 volumes on each Storage = removeable-drives }
And my bacula-sd.conf:
# Define a Virtual autochanger
Autochanger { Name = ExternalDrives Device = ExternalDrives-Drive1 Changer Command = "/usr/local/bin/vchanger -u root %c %o %S %a %d" Changer Device = "/etc/bacula/vchanger1.conf" }
Device { Name = ExternalDrives-Drive1 DriveIndex = 0 Autochanger = yes DeviceType = File Media Type = File Archive Device = /var/lib/bacula/removeable-drives/0/drive0 Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no; Maximum Concurrent Jobs = 5; Maximum Volume Size = 476250 M; # with 8 volumes per drive, this should leave about # 4,800 MB free for other things, or about 0.125% }
|