I have a bad and untested idea that you could try.
First of all you'll need a file autochanger for that (see PR 2090[1]).
* pre-create volumes on your disks (probably already did that)
* create a script that mimics the mtx-changer list/listall output format
but lists the volume names from the drive that is currently plugged in
* configure that script as a changer command in the file autochanger
* set autochanger = yes in the director's configuration for your storage
At this point you should be able to run "status slots" to view the disk
volumes that are currently available.
Also, "update slots" should now set the inchanger flag and update the
slot column in the volume record.
As you enabled the autochanger-flag on the Storage in the director
configuration, the inchanger flag should now be honored.
As a result Bareos should automatically select a volume that is "online".
Best Regards,
Andreas
[1]
https://github.com/bareos/bareos/pull/2090
--
Andreas Rogge
andrea...@bareos.com
Bareos GmbH & Co. KG Phone:
+49 221-630693-86
http://www.bareos.com
Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz