Cartridge tape stuff

Chris Lewis clewis at eci386.uucp
Thu Jun 29 03:32:09 AEST 1989


In article <5755 at lynx.UUCP> m5 at lynx.UUCP (Mike McNally) writes:
>Some cartridge tape drives support a wide variety of block sizes, some
>don't.  Many only support 512-byte blocks.  Is it thus common for
>archives (like tar or cpio) that are intended to be read on several
>different machines to be created with a 512-byte block size?

The confusion here is "logical" versus "physical" block size.
Tar and cpio both have block size setting options for use on variable
record length devices for the simple reason that writing big *physical*
blocks is a win in both performance and tape capacity.  From another point
of view, the most you can read from a tape of this type is the contents
of the next physical block, which are separated from each other by relatively
large block gaps.

As you note, most 1/4" streamers have *only* 512 byte physical blocks, but
the controllers are usually capable of handling requests for multiple physical
blocks as if it was one contiguous logical record.

The only 1/4" streamer devices actually capable of writing variable length
records that I've seen are ones that wouldn't be compatible with an Archive
or Wangtek QIC tape anyhow.  (Eg: CDC Sentinels)

Think of the streamers as if they were 512 byte disk drives without
(reliable) seeking mechanisms, and *very* slow 'request-to-request'
latencies.  Thus: make your logical I/O's as big as you can (taking
into account physical memory) *and* make them integral multiples of 1/2K.

tar and cpio do not change their formats regardless of the buffer size
you give them, they simply use bigger I/O buffers.  You can prove this
to yourself by tar'ing with differing buffer sizes to a file and comparing
the result.  On a fixed 1/2K style streamer you can "tar c" with 1Mb buffers 
with confidence that almost anything can read it (modulo machines with
byteswap or other wierdnesses) using 512 byte buffers if nothing else.

However, there *are* times where buffer size might matter.  Generally
speaking, a tape subsystem that supports variable length physical blocks
must have sufficient buffer memory in the controller to contain a whole
block.  Some controllers don't have enough for "tar -b 10"...
-- 
Chris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc.
UUCP: {uunet!mnetor, utcsri!utzoo}!lsuc!eci386!clewis
Phone: (416)-595-5425



More information about the Comp.unix.wizards mailing list