SUMMARY: overwriting files on tape

From: John Valdes (
Date: Fri Oct 12 1990 - 14:37:48 CDT

Yesterday I asked whether it is possible to overwrite files on 8mm tape with
an Exabyte drive. For my particular situation (Exabyte EXB-8200 tape drive,
Sun st tape driver for 4/330, OS 4.1), it is. However, the overall consensus
is that the ability to overwrite files on tape is dependent on both the tape
drive and the tape driver (which, in turn, is dependent on type of Sun and the

For the Exabyte 8200 (and probably any Sun supplied SCSI tape driver), the
procedure is:

    1% mt fsf <n>
    2% mt bsf 1
    3% mt weof
    4% tar ... (or whatever is used to write to the tape)

In step 1 <n> is chosen so that the tape will be positioned at the beginning
of the file to be over written (at A in the diagram below). Step 2 then
backspaces over the file mark. This positions the tape at a spot at which the
Exabyte can write to the tape (B). (The only places on the tape where the
Exabyte will write is at the beginning of the tape (BOT), the end of the tape
(EOT) or just before a file mark.) At this point, the tape can be written to;
however, it is best to write a file mark, as in step 3, so that the tape can
latter be positioned to the file which is to be written. Step 4 then writes
the new file over the old one.

.. file mark (EOF) file data erase gap file data erase gap ...
           | | | | |
           | | | EOF | |
           | ___________|__________ | | _________|__________ |
           v/ \ v v/ \ v
  B ===================================================================== E
  O ... |/////// FILE n-1 /////// |/////// FILE n /////// | ... O
  T ===================================================================== T
                                      ^ ^
                                      | |
                                      B A

Actually, the Exabyte can write two types of file marks--a "long" mark and a
"short" mark. The long mark is includes an "erase gap", while the short mark
has no gap. The Exabyte can only write when on the BOT side of a long mark;
it can't write when on the BOT side of a short mark (that is, only when it is
in an erase gap). As far as I can tell, file marks written by 'mt' and 'tar'
are long marks.

I also tried using the above procedure on a 1/4" Archive QIC-150 (also on the
4/330), but without success. I haven't tried it on our 1/2" drive, but I'm
sure that it would work. If you have a drive other than an Exabyte, I can only
suggest experimentation.

Thanks to the many who responded: (Daniel Strick) (Michael Lamoureux)
Tom Conroy <trc@ESD.3Com.COM>
Piete Brooks <>
aldrich@sunrise.Stanford.EDU (Jeff Aldrich) (Jose Navarro)
millidc!blue!djm@uunet.UU.NET (Drew Montag) (John P. Linderman)
Vivek Kalra <> (Daryl Crandall)
"Matt Crawford" <> (Daniel Phaneuf)
Tad Guy <> (Eric Wolin)
Larry Thorne <larryt@AE.MsState.Edu>

John Valdes

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:58 CDT