Raw vs Block Tape I/O

Steve Summit stevesu at azure.UUCP
Sun Jan 15 12:30:09 AEST 1984


(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



More information about the Comp.unix mailing list