Hello.
On an installation of mine, where I run Bacula 9.6.7, I often see the
following at the start of a job:
12-May 22:45 jack-dir JobId 8096: Error: sql_create.c:439 Create DB Media record INSERT
INTO Media
(VolumeName,MediaType,MediaTypeId,PoolId,MaxVolBytes,VolCapacityBytes,Recycle,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,VolStatus,Slot,VolBytes,InChanger,VolReadTime,VolWriteTime,VolType,VolParts,VolCloudParts,LastPartBytes,EndFile,EndBlock,LabelType,StorageId,DeviceId,LocationId,ScratchPoolId,RecyclePoolId,Enabled,ActionOnPurge,CacheRetention)VALUES
('Inc4403','File',0,4,53687091200,0,1,7776000,0,1,0,'Append',0,0,0,0,0,0,0,0,'0',0,0,0,3,0,0,0,0,1,1,0)
failed. ERR=ERROR: duplicate key value violates unique constraint
"media_volumename_id"
DETAIL: Key (volumename)=(Inc4403) already exists.
What I think is happening is:
_ two job start at the same time, each targetting a different NAS as
storage;
_ a race arises where both try to use the same volume name.
I think I'm seeing two different variations:
A) In one case:
_ job one succeeds and goes on;
_ job two emits this warning, then emits another one:
2-May 09:30 BackupNASB JobId 8087: Warning: mount.c:215 Open of File device "BackupNASB"
(/share/MD0_DATA/bacula/Backup) Volume "Inc4403" failed: ERR=file_dev.c:190 Could not
open(/share/MD0_DATA/bacula/Backup/Inc4394,OPEN_READ_WRITE,0640): ERR=No such file or directory
_ it marks the volume as "Error" in the catalog;
_ then goes on to with the next volume (Inc4404) and ends with "Ok --
with warnings";
_ the volume in the catalog is then changed to "Used" by job one, which
terminates as "Ok".
B) In another case:
_ job one emits the first warning (but not the second one) then goes on
on that same volume (Inc4403); outcome is "Ok -- with warnings";
_ job two logs the creation of Inc4403 and Inc4404, then uses the second
one; outcome is "Ok".
In the end this seems to be only annoying, as jobs with "warnings" must
be better checked.
Or am I missing something?
bye & Thanks
av.
P.S.
Incidentally, this installation often fails to reuse old volumes, which
I'm forced to delete manually when space fills up: this might be related
to the above or not (I'll eventually start a different thread on this
after the above is solved, if it persists).
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users