Hello Daniel, Here you can find it in the Bacula documentation:
"If you want to tie Bacula to using a single Storage daemon or drive, you must specify a unique Media Type for that drive. This is an important point that should be carefully understood. Note, this applies equally to Disk Volumes. If you define more than one disk Device resource in your Storage daemon's conf file, the Volumes on those two devices are in fact incompatible because one can not be mounted on the other device since they are found in different directories. For this reason, you probably should use two different Media Types for your two disk Devices (even though you might think of them as both being File types). You can find more on this subject in the Basic Volume Management chapter of this manual." https://www.bacula.org/15.0.x-manuals/en/main/Configuring_Director.html#blb:MediaType Best regards, Marcin Haba (gani) On Fri, 8 Aug 2025 at 21:03, Rob Gerber <r...@craeon.net> wrote: > > If you think about the bacula disk "autochangers" as if they were physical > tape libraries with many tape drives onside each, it makes more sense. > > It would be impossible for Library A to send its robot to retrieve a tape > from Library B, since they are two separate units, quite probably at > different sites. In bacula, we prevent issues like this by usual different > media types for each autochanger. > > The big concern I have is that if your inc pool uses either changer 1 or > changer 2 for storage, even specifying media types 1 and 2 in the autochanger > won't prevent all issues. As it stands, I think once you fix the media type > issues, you'll have the jobs randomly choosing to place volumes in changer 1 > or changer 2. Sure, it won't ask changer 1 to give it a volume from changer > 2, but when you do a restore you will have to retrieve volumes from both > changers, which strikes me as odd. I can't imagine it's your goal to randomly > interleave your backup jobs onto two different autochangers. I can see > wanting your job data to be stored in two places, but not on a random basis. > > Do you want job data to be placed in BOTH places for each job? If so, the way > to do this is with a copy job ran after the first job, not the way it is now. > > Robert Gerber > 402-237-8692 > r...@craeon.net > > On Fri, Aug 8, 2025, 1:53 PM Dragan Milivojević <gali...@pkm-inc.com> wrote: >> >> I believe the problem is that both have the same mediatype. >> >> On Fri, 8 Aug 2025 at 20:35, White, Daniel E. (GSFC-764.0)[AEGIS] via >> Bacula-users <bacula-users@lists.sourceforge.net> wrote: >>> >>> I know WHAT is happening, just not WHY >>> I am hoping someone sees something obviously bogus in here. >>> >>> Extract from bacula-dir.conf : >>> >>> Autochanger { >>> Name = "Disk01-Incremental-Autochanger" >>> Address = "<SD Server Address>" >>> Autochanger = "Disk01-Incremental-Autochanger" >>> Device = "Disk01-Incremental-Autochanger" >>> MaximumConcurrentJobs = 10 >>> MediaType = "DiskVolume" >>> Password = <redacted> >>> SdPort = 9103 >>> } >>> >>> Autochanger { >>> Name = "Disk02-Incremental-Autochanger" >>> Address = "<SD Server Address>" >>> Autochanger = "Disk02-Incremental-Autochanger" >>> Device = "Disk02-Incremental-Autochanger" >>> MaximumConcurrentJobs = 10 >>> MediaType = "DiskVolume" >>> Password = <redacted> >>> SdPort = 9103 >>> } >>> >>> Pool { >>> Name = "Incremental" >>> ActionOnPurge = Truncate >>> AutoPrune = yes >>> LabelFormat = "IncVol-" >>> MaximumVolumeBytes = 536870912000 >>> MaximumVolume = 20 >>> PoolType = "Backup" >>> PurgeOldestVolume = yes >>> Recycle = yes >>> Storage = >>> "Disk01-Incremental-Autochanger","Disk02-Incremental-Autochanger" >>> StorageGroupPolicy = "FreeSpace" >>> VolumeRetention = 2 weeks >>> } >>> >>> Extract from bacula-sd.conf : >>> >>> Autochanger { >>> Name = "Disk01-Incremental-Autochanger" >>> ChangerCommand = "/dev/null" >>> ChangerDevice = "/dev/null" >>> Device = >>> "Disk01-Dev01-Incremental","Disk01-Dev02-Incremental","Disk01-Dev03-Incremental","Disk01-Dev04-Incremental","Disk01-Dev05-Incremental","Disk01-Dev06-Incremental","Disk01-Dev07-Incremental","Disk01-Dev08-Incremental","Disk01-Dev09-Incremental","Disk01-Dev10-Incremental" >>> } >>> >>> Autochanger { >>> Name = "Disk02-Incremental-Autochanger" >>> ChangerCommand = "/dev/null" >>> ChangerDevice = "/dev/null" >>> Device = >>> "Disk02-Dev01-Incremental","Disk02-Dev02-Incremental","Disk02-Dev03-Incremental","Disk02-Dev04-Incremental","Disk02-Dev05-Incremental","Disk02-Dev06-Incremental","Disk02-Dev07-Incremental","Disk02-Dev08-Incremental","Disk02-Dev09-Incremental","Disk02-Dev10-Incremental" >>> } >>> >>> Device { >>> Name = "Disk01-Dev01-Incremental" >>> AlwaysOpen = yes >>> ArchiveDevice = "/backups/Disk01/INCREMENTAL" >>> AutomaticMount = yes >>> DeviceType = File >>> LabelMedia = yes >>> MaximumConcurrentJobs = 5 >>> MediaType = "DiskVolume" >>> RandomAccess = yes >>> RemovableMedia = no >>> } >>> ... repeat 39 for times changing Name and ArchiveDevice as needed >>> >>> Finally, the bacula.log extract showing the error: >>> >>> >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Start Backup JobId 36, >>> Job=<Bacula Server>.2025-07-30_03.00.00_32 >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Connected to Storage >>> "Disk02-Incremental-Autochanger" at <SD Server Address>:9103 with TLS >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Using Device >>> "Disk02-Dev05-Incremental" to write. >>> ... >>> >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Storage >>> "Disk02-Incremental-Autochanger" was selected out of group of 2 available >>> storages. StorageGroupPolicy "FreeSpace" used >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Connected to Client "<Bacula >>> Server>-fd" at <SD Server Address>:9102 with TLS >>> 30-Jul 03:00 <Bacula Server>-fd JobId 36: Connected to Storage at <SD >>> Server Address>:9103 with TLS >>> ... >>> 30-Jul 03:00 <Bacula Server>-dir JobId 36: Created new >>> Volume="IncVol-0007", Pool="Incremental", MediaType="DiskVolume" in catalog. >>> 30-Jul 03:00 <Bacula Server>-sd JobId 36: Labeled new Volume "IncVol-0007" >>> on File device "Disk02-Dev05-Incremental" (/backups/Disk02/INCREMENTAL). >>> 30-Jul 03:00 <Bacula Server>-sd JobId 36: Wrote label to prelabeled Volume >>> "IncVol-0007" on File device "Disk02-Dev05-Incremental" >>> (/backups/Disk02/INCREMENTAL) >>> Termination: Backup OK >>> >>> Note that Disk02 is used >>> Volume "IncVol-0007" created here >>> >>> Subsequent jobs run and append to Volume "IncVol-0007" >>> >>> 03-Aug 03:00 <Bacula Server>-dir JobId 48: Connected to Storage >>> "Disk02-Incremental-Autochanger" at <SD Server Address>:9103 with TLS >>> 03-Aug 03:00 <Bacula Server>-dir JobId 48: Using Device >>> "Disk02-Dev08-Incremental" to write. >>> 03-Aug 03:00 <Bacula Server>-dir JobId 48: Storage >>> "Disk02-Incremental-Autochanger" was selected out of group of 2 available >>> storages. StorageGroupPolicy "FreeSpace" used >>> ... >>> 03-Aug 03:00 <Bacula Server>-sd JobId 48: Volume "IncVol-0007" previously >>> written, moving to end of data. >>> >>> Now we get the error: >>> >>> This time, the StorageGroupPolicy of "FreeSpace" picks Disk01 ! >>> >>> 08-Aug 03:00 <Bacula Server>-dir JobId 65: Using Device >>> "Disk01-Dev06-Incremental" to write. >>> 08-Aug 03:00 <Bacula Server>-dir JobId 65: Storage >>> "Disk01-Incremental-Autochanger" was selected out of group of 2 available >>> storages. StorageGroupPolicy "FreeSpace" used >>> 08-Aug 03:00 <Bacula Server>-sd JobId 65: Warning: mount.c:216 Open of File >>> device "Disk01-Dev06-Incremental" (/backups/Disk01/INCREMENTAL) Volume >>> "IncVol-0007" failed: ERR=Could not >>> open(/backups/Disk01/INCREMENTAL/IncVol-0007,OPEN_READ_WRITE,0640): ERR=No >>> such file or directory >>> 08-Aug 03:00 <Bacula Server>-sd JobId 65: Marking Volume "IncVol-0007" in >>> Error in Catalog. >>> >>> ============================= >>> >>> The volume's path is /backups/Disk02/INCREMENTAL/IncVol-0007 >>> but Bacula is looking to write to /backups/Disk01/INCREMENTAL/IncVol-0007 >>> >>> Here is the problem. >>> >>> The same line >>> StorageGroupPolicy = "FreeSpace" >>> is in each JobDefs resource in bacula-dir.conf >>> >>> Does anyone see a stupid mistake made on my part ? >>> >>> Does anyone see a way past this mess ? >>> >>> Thanks in advance. >>> >>> >>> _______________________________________________ >>> Bacula-users mailing list >>> Bacula-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bacula-users >> >> _______________________________________________ >> Bacula-users mailing list >> Bacula-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bacula-users > > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users