SCSI tape data loss

Kern Sibbald kern at sibbald.com
Tue Jun 3 08:12:16 PDT 2003


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.





More information about the freebsd-scsi mailing list