Bacula, Autochangers: insist on loading 'not in changer' media...
We have some setups using bacula (debian buster, 9.4.2-2+deb10u1) and RDX media, by the way of the 'vchanger' (Virtual Changer) script.
All works as expected, until the current mounted media exhaust the 'in changer' media (because exhausted it; or because simply users load the incorrect media...).
After that, bacula try to mount expired (purge them) or generically available volumes from other media, that are not in changer, putting them on error. We have extensively debugged vchanger script, that seems behave correctly.
Bacula seems have a current and correct state of 'in changer' volumes, and anyway a update volumes
on console does not solve the trouble.
On director we have:
Autochanger {
Name = SDPVE2RDX
Address = sdpve2.sd.lnf.it
SDPort = 9103
Password = "unknown"
Maximum Concurrent Jobs = 5
Device = RDXAutochanger
Media Type = RDX
}
Pool {
Name = VEN-SD-SDPVE2RDXPool
Pool Type = Backup
Volume Use Duration = 1 days
Maximum Volume Jobs = 1
Recycle = yes
AutoPrune = yes
Action On Purge = Truncate
Volume Retention = 20 days
}
On SD we have:
Autochanger {
Name = RDXAutochanger
Device = RDXStorage0
Device = RDXStorage1
Device = RDXStorage2
Changer Command = "/usr/bin/vchanger %c %o %S %a %d"
Changer Device = "/etc/vchanger/SDPVE2RDX.conf"
}
Device {
Name = RDXStorage0
Drive Index = 0
Device Type = File
Media Type = RDX
RemovableMedia = no
RandomAccess = yes
Maximum Concurrent Jobs = 1
Archive Device = "/var/spool/vchanger/SDPVE2RDX/0"
}
Device {
Name = RDXStorage1
Drive Index = 1
Device Type = File
Media Type = RDX
RemovableMedia = no
RandomAccess = yes
Maximum Concurrent Jobs = 1
Archive Device = "/var/spool/vchanger/SDPVE2RDX/1"
}
Device {
Name = RDXStorage2
Drive Index = 2
Device Type = File
Media Type = RDX
RemovableMedia = no
RandomAccess = yes
Maximum Concurrent Jobs = 1
Archive Device = "/var/spool/vchanger/SDPVE2RDX/2"
}
Thanks.