[Info-vax] Getting tape drive errors make no sense

Johnny Billquist bqt at softjar.se
Thu Oct 31 17:41:45 EDT 2013


On 2013-10-31 21:02, George Cornelius wrote:

> I believe Unix/Linux may try to make tapes appear to
> be byte stream oriented, this being a somewhat different
> concept from so-called streaming hardware.  But under
> Unix the programming interface may be hiding the detailed
> information about the blocking through its use of buffers.
> My experience is that tar is quite unhappy if the block
> size is different from the default and you do not
> specify, or incorrectly specify, the blocksize via
> the command line.

Hijacking this part - sorry all VMSers...

Yes, Unix/Linux do have a stream-of-byte interface for tapes. Noone uses 
it, unless they are mad. And I don't think I've met anyone that mad in 
quite a while.

This is the block mode device. Unix/Linux blocks/deblocks I/O to the 
tape, and you seem to have just a stream of bytes. Of course, the tape, 
being record oriented, still have records underneath.

Most any program on Unix/Linux will instead use the raw tape device, 
which actually gives you real tape records, variable length and all. 
Very much not in the spirit of Unix in general, but still what people 
actually want.

The problem with programs like tar is that they don't try to figure out 
what record length was actually used when a tape was written, so unless 
you go with the default, you have to specify the record length on both 
reads and writes. But, if you do that, it works just fine.

(Substitute record length with block size, record size, or whatever, in 
all the text above, if it makes you happier...)

	Johnny




More information about the Info-vax mailing list