Bacula-users

Re: [Bacula-users] Recycling problem.

2014-10-18 04:26:47
Subject: Re: [Bacula-users] Recycling problem.
From: Giuseppe Vitillaro <giuseppe AT vitillaro DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 18 Oct 2014 10:21:03 +0200

> Consider how Bacula treats the case where "maximum volume jobs = 1". The job starts to run and selects a volume marked "append", possibly first recycling a volume if no available "append" volumes are empty. It then marks the volume as "used" so that no other jobs will try to select it. After it is marked "used" the job continues and writes the job data to it. So, yes, there is a use for writing a volume after it is marked "used". Since multiple jobs may start at the same or nearly the same time, Bacula serializes volume selection by allowing only one job at a time to select a volume. So the job that marked it "used" writes to it, but no other job can subsequently select it.

>

> I think something similar is happening when "use duration" runs out while the job is running. The "use duration" period begins when the volume is first written to, which is always AFTER the job starts. If the "use duration" is an integer multiple of the time period between job runs, then there will always be a job that starts just minutes or seconds BEFORE the  "use duration" expires. That causes the volume to get marked "used" during the job, though it was indeed marked "append" when the job first started. The job doesn't (and shouldn't) fail because of this. It continues and writes to the "used" volume.

>

> Jobs that start after the volume is marked "used" will NOT select it when searching for a volume. This is why it is a good idea to make the "use duration" period a bit shorter. That way the "use duration" has already expired before the job starts.

>

> So, I don't think you are "wrong". I just think you are miscalculating the exact time of the end of the "use duration" period, that the volume isn't being marked "used" until after the job has already started, meaning that the "Use duration" is too long.

 

The reason for which bacula marks "used" the volume 000529L4 "after"

the job started is clear and for me would be perfectly

acceptable if the jobs continue to write on this volume

for this particular job. The logic looks correct.

 

My trouble starts trying to understand why bacula do this:

 

13-Oct 21:02 bl13-dir JobId 1761: Recycled volume "000506L4"

13-Oct 21:02 bl13-sd JobId 1761: Recycled volume "000529L4" on device "lto1" (/dev/nlto1), all previous data lost.

 

Bacula director decided to "recycle" the correct volume, the one which has

just pruned and purged 000506L4

 

13-Oct 21:02 bl13-dir JobId 1761: There are no more Jobs associated with Volume "000506L4". Marking it purged.

13-Oct 21:02 bl13-dir JobId 1761: All records pruned from Volume "000506L4"; marking it "Purged"

 

Now why on the hell the storage daemon recycle the volume 000529L4

which has not neither expired, purged or recycled?

 

Just trying to undertand, forgive me, but this is driving

me crazy ;-)

 

G. Vitillaro.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users