Skip site navigation (1)Skip section navigation (2)
Date:      03 Jun 2003 17:11:47 +0200
From:      Kern Sibbald <kern@sibbald.com>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        mjacob@feral.com
Subject:   Re: SCSI tape data loss
Message-ID:  <1054653106.13606.217.camel@rufus>
In-Reply-To: <3490610000.1054651919@aslan.scsiguy.com>
References:  <3EDB31AB.16420.C8964B7D@localhost> <3EDB59A4.27599.C93270FB@localhost> <20030602110836.H71034@beppo> <20030602131225.F71034@beppo>	 <1054645616.13630.161.camel@rufus> <3490610000.1054651919@aslan.scsiguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2003-06-03 at 16:51, Justin T. Gibbs wrote:
> > Hello,
> > 
> > Dan has now re-run our test of writing to two tapes. In
> > this test, he told Bacula not to attempt to re-read the
> > last block written, so Bacula wrote until -1 with errno=ENOSPC
> > was returned, wrote two EOF marks then put up
> > the next volume.
> 
> Bacula is supposed to start the process of a tape change as soon
> as the amount written is less than what you intended to write.


This is exactly what it does. *Every* time the requested write 
size does not agree with the returned value, Bacula gives 
up on the tape.  My last email has the code that does that.

My email above was not very clear because I was telling you what
happened in the particular case of loss of data (the -1 and errno=0
or errno=ENOSPC I don't know which). As noted here, Bacula *will*
stop writing if the driver returns a short block (assuming my
code isn't broken), but I have never seen that case on FreeBSD.

> Ignoring the short write and waiting until you hit ENOSPC guarantees
> you will hit PEOM, since the LEOM is only reported once.  The tape
> driver expects that you know what you are doing if you go on writing.

The only additional writing Bacula does (unless I am missing something)
is the two EOF marks.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1054653106.13606.217.camel>