Subject: Re: check condition on first tape usage...
To: None <paul@whooppee.com>
From: Matthew Jacob <mjacob@ns.feral.com>
List: current-users
Date: 11/02/1997 15:34:03
(I'm cc-ing this to current users because I believe this is of general
interest).

Okay- this is a different problem from the initial tape test unit ready
problem.

Once a tape is loaded 'mounted', all TUR's that get an error will cause an EIO.

In either case, this particular problem actually sounds like the problem
that NetBSD always seems to be writing two filemarks at EOT based upon whether
a device is in variable mode- not whether it's actually a 1/2" reel tape.

Amanda is getting confused because the extra filemark has been added,
essentially creating an unexpected extra zero length tape file.

I asked current-users about this behaviour a while back (no answer). I asked
Charles (since he's the one who committed this driver into NetBSD)
(no answer).

Because this was so close to 1.3 release, I felt it inappropriate to try
and go out and change the default behaviour (even if I think it malformed).

Anyone want to wade in on this?

-matt


>From paul@whooppee.com  Sun Nov  2 15:46:54 1997
Date: Sun, 2 Nov 1997 15:53:21 -0800 (PST)
From: Paul Goyette <paul@whooppee.com>
To: Matthew Jacob <mjacob@ns.feral.com>
Subject: Re: check condition on first tape usage...
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Well, I don't have SCSIVERBOSE set, but I _do_ get a console message:

	/netbsd: st0(ncrscsi0:4:0): error code 0


More info:

Using the amanda utility amrestore, I get the following sequence of
events:

1. Program opens tape device, and executes a "skip n files" command which
succeeds, leaving the tape positioned after a tape mark.

2. Program then immediately tries to read next tape record, and gets an
I/O error, presumably because the previous operation detected a tape mark.

3. Program bombs out, since it doesn't expect an error.

In order to restore from an amanda tape, I have to use mt(1) to skip the
first n files, and then use "dd skip=1 ..." to skip the header record and
pipe the rest to restore(8).  Apparently, by closing and then reopening
the tape device, the "previous operation resulted in an error" flag is
reset.



On Sun, 2 Nov 1997, Matthew Jacob wrote:

> Could you do me a favor and make sure you've compiled with SCSIVERBOSE
> and send me the error output (i.e., full messages)... The open code
> looks like it's supposed to be doing a IGNORE MEDIA CHANGE on the open-
> either we're not waiting long enough (and we're getting a NOT READY (unit
> in process of becoming ready)) error, or there's another error we're hitting
> here, or ERESTARTSYS is broken.
> 
> 

-----------------------------------------------------------------------------
| Paul Goyette       | PGP Public Key fingerprint:  | E-mail addresses:     |
| Network Consultant |     0E 40 D2 FC 2A 13 74 A0  |  paul@whooppee.com    |
| and kernel hacker  |     E4 69 D5 BE 65 E4 56 C6  |  paul_goyette@ins.com |
-----------------------------------------------------------------------------