Date: Sun, 18 Dec 2005 17:41:47 -0500 From: Matthew Jacob <lydianconcepts@gmail.com> To: Dan Langille <dan@langille.org> Cc: freebsd-scsi@freebsd.org Subject: Re: no tape - ENXIO - device not configured Message-ID: <7579f7fb0512181441t26a8a90bv5970d3dcd8eef5c6@mail.gmail.com> In-Reply-To: <43A46030.31260.5B3110E@localhost>
index | next in thread | previous in thread | raw e-mail
open the control device- that's what it's there for. On 12/17/05, Dan Langille <dan@langille.org> wrote: > > You probably know that I'm a developer on the Bacula > <http://www.bacula.org/> project. One of the issues we're trying to > improve now is using the tape drive when there is no tape. > > Basically Bacula needs to open() the tape drive so that it can > read/write it. On both Linux and Solaris, it is possible to open the > drive with O_NONBLOCK and get a descriptor that can be used for > ioctl() calls and providing there is a tape in the drive, it can be > used for read() and write(). > > On FreeBSD, if there is no tape in the drive, the OS always > immediately returns errno=ENXIO "Device not configured". This means > that on FreeBSD, if there is no tape in the drive, that drive is > totally unusable by Bacula. > > Another developer, who actually does most of the tape writing > routines had two suggestions: > > 1. Modify Bacula and system dependent code that opens the control > device to see if a tape drive is really there or not, and then > rewrite the tape driver code to deal with the fact that if you cannot > open a device, it may really be there, and you should continue trying > to open it between asking the user to mount it. This is clearly > possible. > > 2. Consider implementing something in FreeBSD as exists on at least > Linux and Solaris -- i.e. a means to open the drive and get a valid > file descriptor. If you read/write/rewind/... a drive opened and > there is no tape, it should either return EIO or better ENOMEDIUM. > > Comments? > > -- > Dan Langille : http://www.langille.org/ > BSDCan - The Technical BSD Conference - http://www.bsdcan.org/ > > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7579f7fb0512181441t26a8a90bv5970d3dcd8eef5c6>
