Bacula-users

Re: [Bacula-users] Why bacula does not mark job as failed after "Write error" on tape drive?

2013-12-06 07:35:02
Subject: Re: [Bacula-users] Why bacula does not mark job as failed after "Write error" on tape drive?
From: Kern Sibbald <kern AT sibbald DOT com>
To: Andrey Lyarskiy <alyarskiy AT stacksoft DOT ru>
Date: Fri, 06 Dec 2013 13:32:38 +0100
Hello again,

Nice to know you understand :-)

To answer you question. The job terminates normally,
but with errors, and if I am not mistaken, the number
of errors are noted in the job record.

I have thought about introducing a new termination code
(normal termination but with errors), and it may even be
partially implemented, but it is not easy to put into effect
because it would change current behavior and possibly break
existing programs.

It is a good point to look at though, and shortly, I will be
reviewing how Bacula handles error conditions so that it can
more easily work with translations and programs that look
for "the" error condition -- currently multiple error or fatal messages
may be printed, and I would like to reduce or eliminate that.

Best regards,
Kern

On 12/06/2013 11:59 AM, Andrey Lyarskiy wrote:
> On Fri, 06 Dec 2013 11:14:25 +0100
> Kern Sibbald <kern AT sibbald DOT com> wrote:
>
> Hello, Kern! Thank you for explanation.
> And - yes, I do know the difference between "may not" and "not" =)
>
> It is a bit strange - at the moment of error bacula "knows" what job
> is being running but the only warning is in log-file.
>
> Of course log file can be periodically parsed, but why not to mark job
> with warning flag as at this point we can not be sure is job valid or not.



>
>> Hello,
>>
>> The Bacula behavior is indeed correct (as programmed).  This is an
>> error, but it is not a fatal error.  Note that the error message is
>> in the conditional
>> tense (maybe not obvious for non-mother tongue speakers), which means
>> that the tape may not be readable, but that the only way to know for
>> sure is to read the tape.
>>
>> This can happen if the end of the tape has been reached and the drive
>> does not permit writing the final EOF.  As mentioned above, the
>> only way to know for sure is to try to read the last files written to
>> the tape.
>>
>> Given the uncertainty, it is not really justified to mark everything
>> as failed, because it is extremely unlikely that the whole tape is
>> bad or unreadable. You may correctly have a different opinion, but in
>> that case you will either need to change the source code or after the
>> fact, mark the tape as being unusable using bconsole.
>>
>> Best regards,
>> Kern
>>
>> On 12/05/2013 10:34 AM, Andrey Lyarskiy wrote:
>>> Greetings! Recently I have noticed that all jobs status are fine,
>>> independently of write errors on tape drive.
>>>
>>> bacula.log:
>>> 05-Dec 07:27 backup-sd-office JobId 66089: Error: block.c:577 Write
>>> error at 280:554 on device "Drive-0" (/dev/nst0). ERR=Input/output
>>> error. 05-Dec 07:27 backup-sd-office JobId 66089: Error: Error
>>> writing final EOF to tape. This Volume may not be readable.
>>> dev.c:1557 ioctl MTWEOF error on "Drive-0" (/dev/nst0).
>>> ERR=Input/output error. 05-Dec 07:27 backup-sd-office JobId 66089:
>>> End of medium on Volume "000842L5" Bytes=1,296,312,966,144
>>> Blocks=20,094,136 at 05-Dec-2013 07:27.
>>>
>>> TapeLibrary - IBM 3573-TL with LTO5 tapes.
>>>
>>> Why bacula did not mark job #66089 as failed? IMHO after such error
>>> all the jobs on this tape should be marked as possible-unreadable or
>>> something like that.
>>>
>>> ------------------------------------------------------------------------------
>>> Sponsored by Intel(R) XDK 
>>> Develop, test and display web and hybrid apps with a single code
>>> base. Download it for free now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Bacula-users mailing list
>>> Bacula-users AT lists.sourceforge DOT net
>>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>>


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users