[net.unix] Raw vs Block Tape I/O

54394gt@hocda.UUCP (G.TOMASEVICH) (01/12/84)

There was a comment on rarely using the block version of mag-tape i/o.  On our
system, USG 4.2, 'cat' does not flush the last block if only partially full,
for block tape writes, so block i/o is worse than useless in that case.
Many commands seem to work either way on tape, though.  I prefer using raw, or
character-special mode, for reading, since it will correctly read any size
tape block that fits into the supplied buffer.  The main advantage of raw
tape i/o is using large buffers (and hence record size) to minimize the
amount of tape used up for inter-record gaps.

stevesu@azure.UUCP (Steve Summit) (01/15/84)

(From Rich Wales):  "Most tape drivers also have a block
interface, although I have never had occasion to access a tape by
anything but the raw interface."

If you want to, though, you can, and if the tape contains a raw
(dd) copy of a filesystem, you can actually mount the crazy
thing, cd onto it, list directories, cat files, etc.  It's
hysterical to watch (the tape has to move all over the place),
and things take forever, since the blocks aren't necesseraly
contiguous and they're never near the inodes.  (This may not be
true for newer systems.)

You do have to be careful to mount the tape -r for readonly, so
that the kernel won't try to update the last-accessed times on
the inodes.  (You never want to rewrite tape blocks.) 
Furthermore, if you have any subtle bugs in your magtape driver,
this trick will probably find them.

It is a good way to get a file off of an image backup if you
don't have a spare disk to read the whole tape onto.  Just use
cp!
                                         Steve Summit
                                         tektronix!tekmdp!stevesu

guy@rlgvax.UUCP (Guy Harris) (01/17/84)

Mounting a tape as a file system will only work if the tape was written
with a block size of 512 or 1024 or whatever your UNIX uses as the disk
block size; either it's in the 512-1024 range, which wastes a *lot* of tape,
or it's something reasonable for tape, in which case small files will waste
a *lot* of disk space.

Corollary: it won't work at all with the 4.2BSD file system, which doesn't
*have* a "disk block size" in that sense of the word.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

chris@umcp-cs.UUCP (01/18/84)

More fun: try generating a system that uses the tape drive as a swap area.
Apparently someone accidently did this back when we first got the CS Vax.
Doesn't run very well that way....
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris.umcp-cs@CSNet-Relay

root@zehntel.UUCP (01/25/84)

#R:hocda:-34100:zinfandel:21300003:000:234
zinfandel!berry    Jan 23 14:21:00 1984

Even more fun yet:  I heard an apocryphal story that one Research PDP-11
once broke a disk drive, and for a week they swapped to DECtape!!

Talk about SLOW!

Berry Kercheval		Zehntel Inc.	(ihnp4!zehntel!zinfandel!berry)
(415)932-6900

guy%ucla-locus@sri-unix.UUCP (01/27/84)

From:  Richard Guy <guy@ucla-locus>

My understanding from Charley Kline, Evelyn Walton, and other old-timers
from UCLA is that swapping from DECtape was done for some number of
months--in fact, that was the only mass-storage peripheral on the 11/45
at the time.  The ENTIRE system was on DECtape--they wrote a new tape twice
a week to deal with tape wearout.  Slow, yes.  Workable, yes.

richard

ron%brl-vgr@sri-unix.UUCP (01/27/84)

From:      Ron Natalie <ron@brl-vgr>

This is getting a litle far fetched.  Dectapes have typically only
a bit over 500 (512 byte) blocks on them, making them small in addition
to extremely slow.

-Ron

obrien%rand-unix@sri-unix.UUCP (01/27/84)

        Back in the days when a big UNIX system was a fully loaded 11/45
with RK05 disk drives, TU10 magtape and TU56 DECtape, it was not at all
uncommon to have a stripped-down UNIX on a DECtape for emergency use when
the root pack became corrupted and a disk drive broke.  Run off DT0, swap
on DT1.  It was slow but really tended to save lives in emergencies.

clark.wbst@PARC-MAXC.ARPA (01/27/84)

But boy, is it FUN to WATCH a machine with a DECTAPE as it's only
mass storage!

--Ray

trb@masscomp.UUCP (Andy Tannenbaum) (01/31/84)

	From:      Ron Natalie <ron@brl-vgr>
	This is getting a litle far fetched.  Dectapes have typically only
	a bit over 500 (512 byte) blocks on them, making them small in addition
	to extremely slow.

Come on, Ron.  If you wanted more blocks on your dectape, all you had
to do was drag your finger on the reel while you ran the dectape
formatter.

	Andy Tannenbaum   Masscomp Inc  Westford MA   (617) 692-6200 x274