do we have MTIOCLRERR on ioctl?

Nate Lawson nate at root.org
Wed May 14 15:54:17 PDT 2003


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