[comp.unix.ultrix] Logical EOT marks on TK50's, Recovering data from beyond

graham@geovision.uucp (Graham Ashby) (05/25/89)

    Recently, I ran into an interesting problem involving tar and a tk50
tape...  One of the folks at the site I'm currently visiting had created a
tar archive of some (reasonably) important files.  All went smoothly until
they tried to restore these files and they made a 'one-key' error...  They
wound up typing 'tar cv' instead of 'tar xv' and stomped the archive.

    At this stage, I got involved... "No problem" sez I, "I'll just skip
over the empty tar, then use the 'badtar' [by mike@erix.UUCP] filter to
scrape the rest of the original archive off the tape". Unfortunatly,
attempting this just caused a lot of hard errors to be generated by the tape
driver...  Now, I know that 'tar' did'nt go and erase the tape before it
wrote the second, empty, archive so it seemed that either the driver kept a
block list on the tape, or there was some kind of tape mark (as opposed to a
file mark) written on the tape after the last block of data.

    After looking at a couple of include files (namely sys/vax/tmscp.h) I
found a couple of items that suggest that there *is* some sort of eot mark
written by the driver, and also that it *is* possible (for the driver) to
erase these marks [M_ST_LED, LEOT detected, and M_MD_DLEOT, Delete LEOT].

    What I'd really like is some information (a program/routine ?) on how to
get at these commands.  It seems to me that the error that led to this query
is one that can be quite easily made, and that some mechanism for recovering
data from beyond a 'LEOT' (Logical End Of Tape ?) would be useful to a large
number of (occasionaly) thick fingered folk...

    We did come up with a method for doing this, but as it involved, er,
a 'Controled Loss Of Power' to a system while creating a tar archive on the
stomped tape, it leaves more than a little to be desired. This 'solution'
involved tar-ing some stuff to the tape with the stomped archive and turning
off the system involved before the tar had completed, thus preventing the tk50
driver from writing a LEOT at the end of the archive.  This works (after a
fashion) but is a bit like swatting a fly with a sledgehammer...

    Any comments or suggestions ?  If so, please e-mail them to me as the
site I'm at now is not news-connected, but does get e-mail.

Thanx,
Terry McGonigal, Geovision Corp, Usually Ottawa ON, Currently Wellignton NZ.
UUCP:   terry@geovision.UUCP         uunet!mitel!sce!cognos!geovision!terry