[Info-vax] Copying VMS SaveSet Under Windows
glen herrmannsfeldt
gah at ugcs.caltech.edu
Sun Nov 21 19:53:38 EST 2010
jbriggs444 <jbriggs444 at gmail.com> wrote:
(snip)
> To the best of my knowledge, modern tape drives
> still adhere to the classical presentation:
> blocks separated from one another by [emulated] inter-record gaps.
> files separated from one another by [emulated] tape marks.
> end of tape is encoded as [emulated] consecutive tape marks.
> Even Unix is able to detect and report inter-record gaps on tape:
> How many bytes came back from that read()?
It is the return value of the read() system call. If the buffer
is big enough, each read() returns one block and its associated length.
If the buffer isn't big enough, then I believe it is an error,
but in any case you lose the block information.
There is one other complication. Some tape drives write fixed
length blocks, independent of the length from the host.
This is an option for LTO. (1K bytes is a popular size.)
(snip)
> Yes indeed. One "gotcha" with this approach is
> that ANSI labelled mag tape allows the possibility of
> an empty file encoded as a pair of back-to-back tape
> marks. Classically there is no way to encode an
> empty drive on tape. Some tape drives have (or had)
> firmware that considers an encoded empty file
> to constitute end-of-tape.
For some, and I believe unix, you just keep reading.
I believe that DAT/DDS knows where the physical EOT is,
and refuses to let you read past it, separate from the
usual two tape marks.
(snip)
> I'm not familiar with the encoding techniques that
> would be used if a Unix user were to request a ten
> byte write operation (classical 8 track mag tape
> drives have a minimum supported record length
> of 14 bytes iirc).
At least for IBM drives, that isn't quite right. If the
read is successful it can be any size. If it fails with a
read error and is too short, then the drive assumes it is noise,
instead of retrying the read.
But for many now, the blocking and tape marks are virtual, coded
by the drive on write, and decoded on read. Blocks can have
any length, and there is no excessive penalty for small blocks.
-- glen
More information about the Info-vax
mailing list