[comp.sys.sun] Reading past EOT on Sun QIC tape drive

pdb@h.gp.cs.cmu.edu (Patrick Barron) (01/03/90)

Can anyone tell me if it's possible to read past an end-of-tape mark on a
Sun QIC tape drive (i.e., an "st" tape drive)?  One of my users
accidentally blew away a tape he'd written by writing an empty file at the
beginning of the tape.  Just about all of his data is still there, but I
can't convince the st driver to let me read past the EOT marker.  It looks
to me like the driver is trying to be too smart for its own good - is
there a variable or something in the kernel I can patch to make the driver
a little stupider...?  :-)

Thanks!
--Pat.

jae@cs.utexas.edu (Yukon Born) (01/16/90)

In article <4235@brazos.Rice.edu> you write:
|X-Sun-Spots-Digest: Volume 9, Issue 5, message 13 of 19
|
|Can anyone tell me if it's possible to read past an end-of-tape mark on a
|Sun QIC tape drive (i.e., an "st" tape drive)?  One of my users
|accidentally blew away a tape he'd written by writing an empty file at the
|beginning of the tape.  Just about all of his data is still there, but I
|can't convince the st driver to let me read past the EOT marker.  It looks
|to me like the driver is trying to be too smart for its own good - is
|there a variable or something in the kernel I can patch to make the driver
|a little stupider...?  :-)

I tried to find this out because I did the same thing with a really
critical tape.  I got suggestions from the net, none of which helped.  I'm
no guru, but it seems to me the tape drive itself (the hardware) won't
proceed past an EOT - whatever I tried gave me a hard error.  If you
convince the software to ignore errors, the hardware forever tries to read
the EOT, or something.

If you find out how, _please let me know the trick_.  I even cut the tape
in the end - didn't work.  Here I think it's because the QIC format
doesn't get sync'ed up properly.

reimann@uunet.uu.net (Ulf Reimann) (02/01/90)

c-art!jae@cs.utexas.edu (Yukon Born) writes:

>In article <4235@brazos.Rice.edu> you write:
>|X-Sun-Spots-Digest: Volume 9, Issue 5, message 13 of 19
>|
>|Can anyone tell me if it's possible to read past an end-of-tape mark on a
>|Sun QIC tape drive (i.e., an "st" tape drive)?  One of my users
>|accidentally blew away a tape he'd written by writing an empty file at the
>|beginning of the tape.  Just about all of his data is still there, but I
>|can't convince the st driver to let me read past the EOT marker.  It looks
>|to me like the driver is trying to be too smart for its own good - is
>|there a variable or something in the kernel I can patch to make the driver
>|a little stupider...?  :-)

>I tried to find this out because I did the same thing with a really
>critical tape.  I got suggestions from the net, none of which helped.  I'm
>no guru, but it seems to me the tape drive itself (the hardware) won't
>proceed past an EOT - whatever I tried gave me a hard error.  If you
>convince the software to ignore errors, the hardware forever tries to read
>the EOT, or something.

>If you find out how, _please let me know the trick_.  I even cut the tape
>in the end - didn't work.  Here I think it's because the QIC format
>doesn't get sync'ed up properly.

At least to my level of understanding QIC-tapes, it is not possible to
read past an End-Of-Tape. This is due to the fact that the all tracks are
erased when data is written to track 0. I think that is done because of
there is only one erase-head, which can only erase all tracks together.
It is similar to the recording on audio tape: you have to erase the track
before you can record something useful on it. So the erasure takes place
during the writing of track 0. To erase only the track that is to be
written to, you would need two erase-heads, each of which must be capable
of erasing any single track (Maybe the original design tried to save
something by only using one erase-head).  In fact: Even if you could read
past the End-Of-Tape on track 0, it wouldn't help you much, because data
is erased on the end of track 1, the beginning of track 2 and so on. This
also implies that it is not possible to overwrite data on tracks other
than track 0, because the necessary erasure would erase the lower tracks
also.

I think that the above descriptions help to understand the QIC-tape a
little better.

Greetings to the net,
		      Ulf.