Bacula-users

Re: [Bacula-users] Clean bacula server shutdown

2008-10-04 11:28:39
Subject: Re: [Bacula-users] Clean bacula server shutdown
From: Steve Garcia <sgarcia AT bak.rr DOT com>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Thu, 25 Sep 2008 13:34:23 -0700
Martin Simmons wrote:
>>>>>> On Thu, 25 Sep 2008 12:55:09 +0200 (CEST), Sebastian Lehmann said:
>> Hi,
>>
>> Am Do 25.09.2008 11:16 schrieb Erik P. Olsen <epodata AT gmail DOT com>:
>>
>>> On 25/09/08 10:10, Sebastian Lehmann wrote:
>>>> Hi,
>>>>
>>>> Am Mi 24.09.2008 20:52 schrieb Steve Garcia <sgarcia AT bak.rr DOT com>:
>>>>
>>>>> Is there a procedure for shutting bacula down cleanly? In the last
>>>>> two
>>>>> months, I've had to shut down the bacula server twice, once for a
>>>>> scheduled power outage, and once due to a kernel upgrade.
>>>>>
>>>>> Both times I've ended up with "damaged" tape volumes, no longer
>>>>> able
>>>>> to
>>>>> append.
>>>>>
>>>>> "Bad response to Append Data command. Wanted 3000 OK data, got 3903
>>>>> Error append data"
>>>>>
>>>>> Now one additional issue is that when the server is rebooted, the
>>>>> changer device seems to change. I've now written a UDEV rule that I
>>>>> hope will resolve this. In any case, I'm *pretty* sure that this is
>>>>> an
>>>>> unrelated problem, but I could be wrong.
>>>>>
>>>> Release any tape befor shutding down bacula. That should prevent you
>>>> for
>>>> damaged tapes.
>>> Can't bacula gracefully release tape volumes at shutdowns? It may very
>>> well be
>>> that bacula doesn't but isn't it possible?
>>>
>> I believe not,
> 
> It should be clean if you shut down while bacula is idle.
> 
> If you shut down during a backup, then the catalog might not be updated to
> match the tape, which will cause a mismatch next time the tape is used.  Is
> that the situation you are seeing?

That's not the problem (or at least it doesn't seem like it is.) Neither
of the times we have shut the server down has been during a backup.
Bacula has been idle at the time of the shutdown.

The problem is that the tape is still in the drive, and after the
machine comes back up, it gives me an error any time bacula tries to
access the tape drive.

This last time the tape did not get marked as "Error", and after
unmounting (manually) from within bacula, loading a different tape
external to bacula and then manually mounting it inside bacula, bacula
started working with the library again.

Tape 5 was the one I had hand mounted, and as soon as the next job fired
up, bacula decided to go back to the tape that had been in the drive
before.  It unloaded 5, loaded 3 and happily appended to it.  So now it
seems to be happy.

The more I think about it, the more I suspect that the shifting of the
changer device name could be the culprit.  Each access to the tape seems
to be preceded by a call to the changer to query the loaded volume name.
 Since that was bad when the system first came back up, bacula may have
become confused and got huffy about it until I fiddled with the tape
mounting by hand.  I'm hoping fixing udev may have eliminated this
problem.  We'll see, the next time I have to take the system down.


-- 
Steve Garcia
sgarcia AT bak.rr DOT com
Ignorance killed the cat; Curiosity was framed.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>