ian@central.bu.edu (Ian Boardman) (12/30/90)
We have a SparcStation running SunOS 4.1.0 with an Exabyte in an ESM. When I start with a new tape, I can do a sequence of dump tape files, one after the other, as in: # foreach part ( a d g h ) > dump 0unf - /dev/rxd0$part | dd bs=62k of=/dev/nrst0 > end I can read these tapes one after the next, or I can use mt fsf <n> to seek into the tape <n> files. What I can NOT do is start writing at the end of the last tape file after I've done a rewind, NOR can I back space to an intermediate file. Every time I do "mt bsf", it rewinds the tape. Also, on any hard error, such as trying to write at the end of the last tape file, I get a hard error and the tape rewinds even though I used /dev/nrst0, the NO REWIND device. Sun has been polite, but frankly useless. They did not try out my exersize using a sequence of dump files, but a series of EMPTY tar files. This struck me as irrelevant. I would be very willing to bet there is something wrong with the way I do the dump sequence, i.e. using dd as shown above. We have also used this form with the same problematic results: # dump 0unsbdf 346 126 466033 <host>:/dev/nrst0 /dev/rxd0<part> The tape is by no means filled by a full dump of the disk, so we intended to have multiple tape files per tape. On a Sun 4/110, we use Delta Microsystem's driver for their Exabyte, and the mt operations bsf, fsf, and weof work perfectly. I use the pipe command with their version of dd, which fills out every block to be the specified block size (i.e. 62k). Other than my dump command, the next most likely candidate for the source of the problem is Sun's driver. It seems like the drive reads and writes correctly. The problem seems to be the way it handles the end of file marks. Please reply with any advise or helpful comments to ian@park.bu.edu. Thanks. Ian Boardman ian@park.bu.edu Excuse me for this errata. The command pipe I showed is used to get the data over to the *remote host* supporting the Exabyte (the SparcStation), thus I should have said: > dump 0unf - /dev/rxd0$part | rsh <host> dd bs=62k of=/dev/nrst0 dump is run on a Solbourne Sparc running an emulation of SunOS 4.0.3.
slevy@poincare.geom.umn.edu (Stuart Levy) (12/31/90)
Appending to Exabyte tapes is a pain with the Sun 4.1 driver, but possible. You have to accomplish the following: - position the tape immediately PRECEDING an EOF mark (preferably the one following the last useful data on the tape :->) - [re]write that EOF After this it's safe to write data, possibly multiple files, until you reposition the tape (rewind, skip files &c.). Supposing there were <N> data files already on the tape, with the last one followed by a double EOF, normal UNIX tape drivers would perform the above sequence with mt rew mt fsf <N> # Skip past last filemark, between double EOFs mt bsf 1 # Position after last data, before double EOF mt weof # Rewrite EOF However, Sun's tape driver is brain-damaged and does not allow this; it doesn't have the idea of the beginning-of-tape side of a file mark. But you can get the desired effect with mt rew mt fsf <N-1> # Skip to BEGINNING of last file dd if=/dev/nrst0 bs=63k of=/dev/null # Read last file's data # The tape is now positioned after last data mt weof # Rewrite EOF This seems to work at least with the Sun 4.1 SCSI driver. The above owes much to George Goble of Purdue, who wrote a fine explanation of the Exabyte's workings and the Sun SCSI tape driver's peculiarities; it appeared in Sun-spots around the turn of 1988-89 I think. [Ed's Note: The articles are in v7n46 and v7n68, circa Dec 1988. -bdg]] Stuart Levy, Geometry Group, University of Minnesota slevy@geom.umn.edu