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

glen herrmannsfeldt gah at ugcs.caltech.edu
Thu Oct 31 17:22:29 EDT 2013


George Cornelius <cornelius at encompasserve.org> wrote:

(snip)
>> I am not sure what you mean, but I have seen SCSI tape drives 
>> reblock data. They can be set to always write with a fixed block
>> size like 1K, or they can be set to write each block to the 
>> appropriate size, sometimes called variable length.
 
>> If it is set different than you expect, the results can be
>> surprising.
 
> He was probably referring to the 32767 byte limit on RMS
> record size, something that interferes with copying, say,
> a tape with blocksize 65024 to an RMS file.  And, of
> course, the other drawback of copying to an RMS file:
> that VMS BACKUP's bad block handling is not understood
> by a COPY command, so there will be no attempt to
> deal with bad blocks which were successfully rewritten
> on a second or later attempt (hint: for reliability
> reasons, BACKUP does _not_ backspace and overwrite - at
> least as long as the /INTERCHANGE qualifier is not
> present).
 
> With regard to reblocking by SCSI drives, it can be done
> in a transparent way - I believe DLT's do this - so that
> the O/S does not have to know it is happening; but if there
> are drives or controllers that do this in a nontransparent
> way, that mode of operation is not compatible with VMS.

The unix write() system call writes one block of the
specified length. The read() system call reads one block
or the specified length, whichever comes first.
 
> 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.

If the program expects a byte stream, then it will get one,
reading however many bytes are available. If the program expects
tape blocks, then it gets confused it it is reblocked.

I don't remember exactly how I found this, but it was on a
LTO drive I bought cheap on eBay. There is an mt (unix command)
to change the block size on SCSI drives.

-- glen



More information about the Info-vax mailing list