Thanks to those who responded:
Todd Herr <herrt@todzilla.sra.com>
James Ranks <ïb@avnasis.jccbi.gov>
Peter Laws <plaws@enterprise.nssl.noaa.gov>
Frank Smith <FSmith@hoovers.com>
Roger Fujii <rmf@lookhere.com>
David S. Foster <foster@bial1.ucsd.edu>
Jay Lessert <jayl@lscpdx.latticesemi.com>
Birger Wathne <birger@sdata.no>
Chad Price <cprice@molbio.unmc.edu>
Scott D. Yelich <scott@spy.org>
Most who replied mentioned using the mt tape commands to position the tape for
writing multiple tar archives. There appears not to be a way to put a single
tar archive on a tape and then add to it (unlike with tar files on disk, which
can be added to with the "r" operand).
Here's what I wound up doing:
Writing the first archive on a tape:
tar cvf /dev/rmt/0 files_to_archive > archive.1
Using v and directing the output to a file on disk gives a record of what's in
the first archive on the tape.
Writing subsequent archives:
mt -f /dev/rmt/0n eom
tar cvf /dev/rmt/0n files_to_archive > archive.#
The mt eom command winds the tape forward to the end of the recorded media,
i.e. past the last file written on the tape. Then tar creates a new archive at
that point on the tape. Note the use of the no-rewind devices.
Reading archives:
If it's the first one, just do tar xpf /dev/rmt/0 . If it's a later one:
mt -f /dev/rmt/0n fsf #
tar xpf /dev/rmt/0n
The mt fsf forwards the tape past # archives, so if I want to read the nth
archive file, I have to mt fsf n-1.
This setup requires us to keep good records of what files are in which archive
on a particular tape... which is probably not a bad thing. A couple people
suggested that, for adding files to a tape archive, I could read the entire
archive onto an unused partition, add the new files to be archived to it, then
make a tar or dump of that partition. I might consider that if I can find a
partition big enough that no one's using. For now, the multiple tar archive
will have to do.
Original question:
On Jan 13, 12:17, Bill Fenwick wrote:
>Hi, folks
>
>We've got two Ultra 2's, one running 2.5.1 with a "DX" 8mm tape drive
>connected, and the other running 2.6 with a "XL" 8mm drive.
>
>I'm trying to set up a tape archive of old versions of software we've written,
>and I want to do it in such a way that we can archive some versions, and then
>as we want to put more on tape, we can just append them to the archive(s) that
>already exist on a particular tape. I don't really want to have to use a new
>tape every time we want to archive some more old versions. I also don't want
>to have to do something like read all the old versions off the tape, combine
>them with the ones we want to add, then re-read them all back onto a tape.
>
>So anyway, tar has the "r" operand that seems like it would do exactly what I
>want, except it doesn't work with our drives. When I do a "tar cf" on the
>drive, it creates the new archive fine, but when I try to add to it with "tar
>rf" it bombs with an I/O error and nothing gets added.
>
>When I try this on the 2.5.1 machine, the following shows up on the console:
>
> WARNING: /sbus@1f,0/SUNW,fas@e,8800000/st@4,0 (st4):
> Error for Command: write Error Level: Fatal
> Requested Block: 44 Error Block: 44
> Vendor: EXABYTE Serial Number:
>
> Sense Key: Illegal Request
> ASC: 0x50 (write append error), ASCQ: 0x1, FRU:0x0
>
>Just for fun, I tried gnu's tar and got the same result. I read in the
>documentation that came with gnu's tar that appending doesn't work on some
tape
>drives... is that what's going on here? Is there any way I can set up a tape
>archive that I can easily append to and just as easily read the contents and
>extract from if necessary? (i.e. if the r operand worked, then I could use
tar
>tf to read the tape contents and tar xf to extract, hopefully without a lot of
>hoops to jump through) Do I need a hardware patch or something?
>
>TIA and IWS.
-- Bill Fenwick Email: fenwick@digicomp.com Digicomp Research Voice: (607) 273-5900 ext 32
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:13 CDT