SCSI tape data loss

Kern Sibbald kern at sibbald.com
Wed Jun 4 00:21:04 PDT 2003


Hello,

The latest tests indicate that the sequence that I
gave you below does work. I'm going to look more 
carefully at the Bacula code (the code path is 
fairly complicated) because perhaps it simply
releases the drive without doing a rewind.

I'm going to also work on simplifying the case
that we know fails (and it seems to be perfectly
reproducible).

Best regards,

Kern

On Tue, 2003-06-03 at 20:00, Matthew Jacob wrote:
> > There are now a lot more things making sense
> > because I've had other FreeBSD users report
> > "unbelievable" output from a simple test program
> > I have. I'll respond below, but with the latest
> > test results, the problem seems to be generated
> > from the simple sequence:
> >
> >   write()
> >   ...
> >   write()
> >   ioctl(MTEOF)
> >   ioctl(MTEOF)
> >   ioctl(MTREW)
> >
> > is there any reason why writing two end of file marks
> > followed by a rewind after a series of writes should
> > create data loss?
> 
> No. That, in fact, whould flush data to the tape. Additional filemarks
> should not be written even after you close here because the rewind would
> clear SA_FLAG_TAPE_WRITTEN so a subsequent close won't write more.
> 
> I'm playing around with this some as we speak.
> 
> -matt



More information about the freebsd-scsi mailing list