Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2003 15:54:17 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Dan Langille <dan@langille.org>, Kern Sibbald <kern@sibbald.com>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: do we have MTIOCLRERR on ioctl?
Message-ID:  <20030514155057.R79399@root.org>
In-Reply-To: <3EBFC194.23070.5D6681F1@localhost>
References:  <3EBFC194.23070.5D6681F1@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 May 2003, Dan Langille wrote:
> ------- Forwarded message follows -------
> From:           	Kern Sibbald <kern@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030514155057.R79399>