Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!munnari!natmlab!dmscanb!dmsadel!augean!idall
From: idall@augean.OZ (Ian Dall)
Newsgroups: comp.sys.nsc.32k
Subject: Re: ICM3216: appending on tapes.
Message-ID: <219@augean.OZ>
Date: Mon, 20-Jul-87 00:00:32 EDT
Article-I.D.: augean.219
Posted: Mon Jul 20 00:00:32 1987
Date-Received: Wed, 22-Jul-87 06:36:35 EDT
References: <1857@imag.UUCP>
Reply-To: idall@augean.OZ (Ian Dall)
Distribution: world
Organization: Engineering Faculty, University of Adelaide, Australia
Lines: 36

In article <1857@imag.UUCP> barel@imag.UUCP (Max BAREL) writes:
>I try many times to append on a tape.
>To append on an already written tape one need:
>  -rewind it.
>  -forward skip files already there (with "mt fsf x", or reading them).
>  -then write the new file.
>This don't work (error: can't write output. etc...). I try many sequences
>without success.

Yes, it's a pain isn't it. I'll bet you have a Cipher/Emulux combination.

The trouble is that the erase head is the full width of the tape and erasing
is automatically done on a write to track 1. Over writing of existing data
is not permissible, therefore, because there is no way of erasing the existing
data without erasing the whole tape. An APPEND is possible but to do it
you need to first tell the tape to "seek to end of data" instead of "seek to
end of file". The former is an Emulux SCSI vendor specific command.

What is really needed is a modification to the "mt" command to support
"mt eod". This can be done using the SCSI "Pivot" driver but use care -
stuff it up and you will crash the system (or worse). The more correct
solution is to add an extra ioctl code to the tc driver.

This scsi pivot driver can be used to perform all sorts of other operations
which no one thought to integrate more elegantly into this unix port.
Neither the ROM monitor nor any of the unix utilities support remapping
of bad disk blocks, for example, but it is fairly easy to write a program
using the scsi driver to do this. I can supply a copy to anyone who is
interested. It's pretty primative but it is an example of how to use the
scsi driver. I figured it out by reading the driver source so I suppose
anyone else can too.

-- 
 Ian Dall           "In any argument there will be people on your
                     side who you wish were on the other side."
idall@augean.oz