overwriting files on tape

2007-12-25 7:15:00

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

OS).

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:

dan@breeze.bellcore.com (Daniel Strick)

lamour@maestro.mitre.org (Michael Lamoureux)

Tom Conroy <trc@ESD.3Com.COM>

Piete Brooks <pb@computer-lab.cambridge.ac.uk>

aldrich@sunrise.Stanford.EDU (Jeff Aldrich)

jn%dhruva.caltech.edu@Deimos.Caltech.Edu (Jose Navarro)

millidc!blue!djm@uunet.UU.NET (Drew Montag)

jpl@allegra.tempo.nj.att.com (John P. Linderman)

Vivek Kalra <vk@honasa.att.com>

daryl@dash.mitre.org (Daryl Crandall)

"Matt Crawford" <matt@oddjob.uchicago.edu>

phaneuf@ireq.hydro.qc.ca (Daniel Phaneuf)

Tad Guy <tadguy@abcfd01.larc.nasa.gov>

eric%mpl@ucsd.edu (Eric Wolin)

Larry Thorne <larryt@AE.MsState.Edu>

John Valdes

valdes@geosun.uchicago.edu

Comments

Got something to say?

You must be logged in to post a comment.