appending to tape archives

Phil Dench architec at cutmcvax.OZ
Tue Apr 10 03:20:22 AEST 1990


All this talk about mag tapes has reminded me to post the following.

Does anyone know how to append to existing data on a 1/4" streamer
cartridge mag tape?

I used to be able to do this under 3.1 (but always suspected it was a
bug not a feature) ...

    fd = check_open( "/dev/tape", O_WRONLY | O_APPEND);

... and any subsequent writes would happily append.

Now under 3.2 this just overwrites the first file on the tape.
Anything else I try does the same sort of thing. I cant even do a fsf
then a write because of (from mtio(1)) ...

    A tape is normally open for reading and/or writing, but a tape
    cannot be read and written simultaneously.  After a rewind, an
    unload, or an MTAFILE ioctl, writes may follow reads and
    vice-versa ...

A rewind is no good to me. MTAFILE doesn't work on a 1/4".  And am I
correct in assuming the unload is just an 'mt offline'?

It would be real useful if I could append.  Cartridge tapes cost $60
Australian here.  I don't want to use one for each little project that
I'm archiving.  And I dont really want to restore all the old ones on a
tape just to write them all back with a new one on the end.

    Phil Dench

--------------------------------------------+----------------------------------
                                            | School of Computer Science,
ACSNet: architec at cutmcvax.oz                | Curtin University of Technology,
UUCP:   ...!uunet!munnari!cutmcvax!architec | Kent Street,
ARPA:   architec%cutmcvax.oz at uunet.UU.NET   | Bentley
                                            | Western Australia, 6102
--------------------------------------------+----------------------------------



More information about the Comp.sys.sgi mailing list