On 28/01/2025 19:48, Martin Simmons wrote:
Actually, I think job 92925 runs first (according to the timestamps in the
logs, which are not in order for some reason) and creates the volume using
FileStorage0. Then, for some reason, the SD refuses to use FileStorage0 for
job 92925, which makes it select FileStorage1 instead and get into the loop
trying to create the volume again. When job 92926 runs, it selects
FileStorage0 and uses the newly created volume (because it is a volume with no
jobs at that point).
That's helpful analysis, thank you. I would have thought the volume
would be locked for use of the first job, but if it unlocks it and then
it gets taken over by some other job, that makes sense.
This is a configuration I inherited, and it differs somewhat from the
Ubuntu samples; the director has two "Storage" blocks, FileStorage0 and
FileStorage1, whereas the Ubuntu sample configs instead have two
"Autochanger" blocks, FileChgr1 and FileChgr2. But in both cases, they
point at the same storage daemon address/port, and have different media
types and devices.
Hmm... I notice that in the production configuration of bacula-sd.conf,
the "Device" resources do not define "Maximum Concurrent Jobs", whereas
the Ubuntu samples do. The docs don't say what the default is here
(whereas it's 20 for Maximum Concurrent Jobs under the "Storage"
resource). I wonder??
AFAICS, the "not in SD Device resources or no matching Media Type or is
disabled" message is only invoked at two places in the source:
% grep -1R NO_device .
./src/stored/reserve.c-static char OK_device[] = "3000 OK use device
device=%s\n";
./src/stored/reserve.c:static char NO_device[] = "3924 Device \"%s\" not
in SD Device"
./src/stored/reserve.c- " resources or no matching Media Type or is
disabled.\n";
--
./src/stored/reserve.c- */
./src/stored/reserve.c: dir->fsend(NO_device, dev_name.c_str());
./src/stored/reserve.c- Dmsg1(dbglvl, ">dird: %s", dir->msg);
--
./src/stored/job.c- pm_strcpy(jcr->errmsg, dir->msg);
./src/stored/job.c: dir->fsend(NO_device, dev_name.c_str());
./src/stored/job.c- Dmsg1(100, ">dird: %s\n", dir->msg);
It has only started appearing since the Bacula 13 upgrade, and not
particularly often:
# grep "didn't accept Device" /var/log/bacula/bacula.log{,.1}
/var/log/bacula/bacula.log:23-Jan 22:30 store.nsrc.org-dir JobId 92842:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:23-Jan 22:32 store.nsrc.org-dir JobId 92849:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:24-Jan 00:01 store.nsrc.org-dir JobId 92854:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:25-Jan 21:00 store.nsrc.org-dir JobId 92920:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:26-Jan 02:04 store.nsrc.org-dir JobId 92925:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:27-Jan 22:30 store.nsrc.org-dir JobId 92964:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:27-Jan 22:32 store.nsrc.org-dir JobId 92969:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:27-Jan 22:34 store.nsrc.org-dir JobId 92971:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
/var/log/bacula/bacula.log:28-Jan 00:02 store.nsrc.org-dir JobId 92977:
Storage daemon "FileStorage0" didn't accept Device "FileDev0" because:
3924 Device "FileDev0" not in SD Device resources or no matching Media
Type or is disabled.
Those Dmsg1 calls give me an idea:
*setdebug level=150 storage=FileStorage0
*setdebug level=150 storage=FileStorage1
*setdebug level=150 director
I'll see if I get anything useful from this tonight.
Thanks!
Brian.
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users