more than one tar file on streamer

John Ioannidis - Altair mcvax!sor.inria.fr!ji at uunet.uu.net
Tue Mar 7 21:02:01 AEST 1989


In article <408 at taeva.UUCP> unido!taeva!hans at uunet.uu.net (Hans von Kleist-Retzow) writes:
>I want to write more than one tar file onto a streamer tape. Therefore I
>write the first file as usual. Then I forward one file with the 'mt'
>command. Now I want to write to /dev/nrst0. But it is not possible.

There was a bug in 4.0 (which was fixed in 4.0.1), that required you to
rewind the tape, then fsf the appropriate number of files, in order to get
to the next file on tape. (that's why it takes forever to install 4.0 from
tape -- you rewind and then fsf for every single file).

If you still have 4.0 and don't want to update, you'll have to do just
that; rewind, then fsf one more file. Otherwize, the following worked just
fine on my machine (3/60, shoebox etc, SunOS 4.0_Export rel 4.0.1):

	walkuere$ mt -f /dev/nrst8 rew		# rewind the tape
	walkuere$ tar cvf /dev/nrst8 foo	# create one tar file
	a foo 1 blocks

	walkuere$ tar cvf /dev/nrst8 bar	# create another tar file
	a bar 1 blocks

	walkuere$ mt -f /dev/nrst8 rew		# rewind again
	walkuere$ tar tvf /dev/nrst8		# see what's in the 1st file
	rw-r--r--  0/0      376 Feb 23 18:27 1989 foo

	walkuere$ mt -f /dev/nrst8 fsf 1	# forward one file
	walkuere$ tar tvf /dev/nrst8		# see what's in the second
	rwxr-xr-x  0/0      131 Feb 23 18:27 1989 bar

(This of course works for much larger files, also!)

If you don't fsf 1 after the first tar t or tar x, the tape will go back
to the beginning of the current `file' and read it again. (Thus, if you
tar tvf /dev/nrst8 again, you'll get the file with `bar').  This is not
quite the way tar worked under older releases, (or at least 4.[23]bsd on a
vax), where if you did a tar right after a successful tar, you'd get back
a message saying something to the effect of `bad blocksize=0', but would
go past the EOF mark, ready to read the next file.

In-Real-Life: John Ioannidis
E-Mail-To: <ji at cs.columbia.edu> (preferred), or <ji at walkuere.altair.fr>
P-Mail-To: GIP-Altair, Dom de Voluceau BP105, Rocquencourt 78153 Le Chesnay, FR
V-Mail-To: +33 1 39635227, +33 1 39635417



More information about the Comp.sys.sun mailing list