Subject: Recovering & Tape stuff
To: VaX#n8 <vax@cs.utexas.edu>
From: None <dgilbert@pci.on.ca>
List: current-users
Date: 11/16/1995 23:27:05
>>>>> "n8" == n8  <VaX> writes:

n8> 1) I wrote a tar to tape (very big) 2) The tape got rewound 3) I
n8> accidentally _wrote_ an empty tar file to the beginning of the
n8> tape

n8> Is there any way to read the old tar file?  Every time I try to
n8> "fsf" over the EOF after the first tarfile, I get this error: Nov
n8> 16 09:14:58 localhost /netbsd: st0(aha0:4:0): no data found,
n8> requested size: 1 (decimal), data = 00 00 00 00 00 00 34 17 00 00
n8> 00 00 01 00 00 15 00

	I can feild this one... I do a lot of tape support for our
company.  When you wrote the second zero length file, you would have
also wrote an 'end-of-media' mark with more modern drives (8mil or
4mil)...  I have heard that a very delicate hand on the off switch can
force some drives to read past it... but more likely than not, it's
not a matter of the OS type... it's the tape that will refuse to read
past this mark.

n8> Also, in an unrelated issue, when I tried to restore from old dump
n8> tapes I got some error similar to this: Error: tape block size
n8> (512) is not a multiple of dump block size (1024)

	This may be due to the inability of NetBSD to treat more than
one block as a block for cartridge tapes (which always have 512 byte
blocks).  I'd have to have a look at the tape.

n8> What is going on?  Tape handling is so difficult to understand
n8> unless you are only doing very standard stuff (i.e. one tar-file
n8> per tape, etc).

n8> Any pointers to a description of how the tape handling works under
n8> Unix would be greatly appreciated.  mt(8) just doesn't cut it.

	Having supported tapes on almost everything... I'll say first
that tape support on UN*X stinks.  Each vendor has different problems
(some are downright stupid implementations).  Anyways... you typically
have a 'rewind' and 'non-rewind' tape device.  The rewind 'rmt' device
will always start at the beginning of the tape (although whether the
rewind is before or after the open, is implementation defined).  The
non-rewind device 'nrmt' is probably what you want.

Dave.

-- 
----------------------------------------------------------------------------
|David Gilbert, PCI, Richmond Hill, Ontario.  | Two things can only be     |
|Mail:      dgilbert@pci.on.ca                |  equal if and only if they |
|http://www.pci.on.ca/~dgilbert               |   are precisely opposite.  |
---------------------------------------------------------GLO----------------