SUMMARY: Tape block sizes

From: Sheldon Lee Wen (sheldon.leewen@cgi.com)
Date: Mon Aug 19 2002 - 08:59:44 EDT


My thanks for this go to Joerg Bruehe, Neil McCoy, Dr. Thomas Blinna and
Alan Nabeth.

Neil Replied:

The command:

   tcopy device_name

will work. The first file on the tape will be file 0, then file 1, etc.

##################

Alan Replied with:

Read the record with a legal transfer size for the device
        and interface that is large enough to fit the entire
        record. UNIX tape semantics will report the actual
        record size. So, if you think that 1 MB is larger than
        what you're ever likely to see and that also happens
        to be a valid size for the device, read that much and
        see how many bytes were actually read.

#################

The good doctor wrote:

There is a utility called "tapex" that is part of the "System
Exercisers" optional software subset. It has a reference page. One
thing you can ask it to do is read a tape (start to end) and tell you
the record sizes and record counts. The "-m" option requests this.
Other than reading the tape and counting the bytes in each record, there
is no way; there is not even a rule that each record except the last be
the same size; it is just a convention that many programs write to tape
with a fixed block size and perhaps a partial last block.

#################

Joerg says:

I would use "dd" to read one block, then measure its size:

  dd if=/dev/..... count=1 bs=100000 | wc -c

This should give you the number of bytes read (plus "dd"s
block count lines).

Again, thanks to everyone.

Cheers,

Sheldon Lee Wen

 



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:49 EDT