SCSI tape data loss

Matthew Jacob mjacob at feral.com
Mon Jun 2 15:45:15 PDT 2003



On Mon, 3 Jun 2003, Kern Sibbald wrote:

> On Mon, 2003-06-02 at 23:55, Matthew Jacob wrote:
> > > I suspect that the problem is something very simple such as
> > > the drive buffering data then hitting the physical EOM and
> > > of course any buffered data goes down the bit bucket.
> >
> > A question to ask then is why tape_pattern_tester stopped at LEOT but
> > Bacula didn't and kept going to PEOT.
> >
> > -matt
>
> This was just a thought, because you or Justin said that
> the driver does not fail writes at the LEOF, which means
> that unless you are doing something special in your
> tpt, it is not stopping at the LEOF.

Yes, it does provide a signfier. At the end of one operation that has
athe check condition that indicates early warning:

                } else if (sense->flags & SSD_EOM) {
                        softc->flags |= SA_FLAG_EOM_PENDING;

and

        SA_FLAG_ERR_PENDING     = (SA_FLAG_EOM_PENDING|SA_FLAG_EIO_PENDING|
                                   SA_FLAG_EOF_PENDING),

and at the start of an I/O:

                } else if ((softc->flags & SA_FLAG_ERR_PENDING) != 0) {
		....
                        bp->b_resid = bp->b_bcount;
			...
                        if ((softc->flags & SA_FLAG_EOM_PENDING) != 0) {
                                /*
                                 * We now just clear errors in this case
                                 * and let the residual be the notifier.
                                 */
                                bp->b_error = 0;

The signifier here back to the user application is a write returning
less than the requested amount.


>
> One thought that I had is: the fact that Bacula backs
> up at the EOM to re-read the last record could cause
> some problems.  I've asked Dan if he will re-run the
> Bacula backup/restore test but with the re-read disabled.
> As someone said, this will give one more data point.

Yes.


>
> Another interesting test would be to see if the same
> data loss occurs in a situation where a tape size is
> specified such that Bacula stops writing before the
> EOM on the first tape.

That too.

-matt



More information about the freebsd-scsi mailing list