Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: mcvax!sor.inria.fr!ji@uunet.uu.net (John Ioannidis - Altair) Newsgroups: comp.sys.sun Subject: Re: more than one tar file on streamer Keywords: Hardware Message-ID: <2779@kalliope.rice.edu> Date: 7 Mar 89 11:02:01 GMT References: <408@taeva.UUCP> Sender: usenet@rice.edu Organization: GIP-Altair (IN2|INRIA|LRI) Lines: 43 Approved: Sun-Spots@rice.edu Original-Date: Thu, 23 Feb 89 18:53:30 +0100 X-Sun-Spots-Digest: Volume 7, Issue 185, message 5 of 17 X-Issue-Reference: v7n165 In article <408@taeva.UUCP> unido!taeva!hans@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: (preferred), or P-Mail-To: GIP-Altair, Dom de Voluceau BP105, Rocquencourt 78153 Le Chesnay, FR V-Mail-To: +33 1 39635227, +33 1 39635417