Date: 15 May 2003 09:21:57 +0200 From: Kern Sibbald <kern@sibbald.com> To: Nate Lawson <nate@root.org> Cc: freebsd-scsi@freebsd.org Subject: Re: do we have MTIOCLRERR on ioctl? Message-ID: <1052983316.6566.219.camel@rufus> In-Reply-To: <20030514155057.R79399@root.org> References: <3EBFC194.23070.5D6681F1@localhost> <20030514155057.R79399@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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?1052983316.6566.219.camel>