do we have MTIOCLRERR on ioctl?

Kern Sibbald kern at sibbald.com
Thu May 15 00:22:25 PDT 2003


Hello,

Thanks for the tip. In reading your email and looking
at mtio.h, I do believe that it is exactly what I
need to clear error conditions on FreeBSD, so I will
implement it.

Thanks for the help.

Best regards,

Kern

On Thu, 2003-05-15 at 00:54, Nate Lawson wrote:
> On Mon, 12 May 2003, Dan Langille wrote:
> > ------- Forwarded message follows -------
> > From:           	Kern Sibbald <kern at sibbald.com>
> >
> > PS: Just to amplify a bit: When Bacula gets an EOM,
> > it immediately writes two EOF marks. One would be
> > sufficient, but this way I am sure that the tape
> > is terminated for ALL drives.  It then does
> > two backspace files followed by a backspace
> > record, if that succeeds, it re-reads the last
> > record and compares the CRC and block number with
> > what it wrote and reports success or failure.
> >
> > On FreeBSD (at least your case), it was the backspace
> > record that failed as is the case on a certain number
> > of tape drives. However, what was unusual was that
> > it "froze" the tape. Bacula then does an ioctl()
> > MTIOCLRERR on all systems that support it -- hoping
> > to clear the error condition.
> 
> I'm not very familiar with tape drives but I think what you want is
> MTIOCERRSTAT.  It reads the current error condition and then zeros it (see
> /sys/cam/scsi/scsi_sa.c).  Try using that for Bacula on FreeBSD.
> 
> -Nate



More information about the freebsd-scsi mailing list