Hi E. C.,
> Is there a way to tell if a tape has been used by examining its
> contents? I understand that a used tape that has been only "erased", will
> still have the data on it. The erasure only wipes out the header blocks,
> right? Could I somehow read some of the tape - even though I have no idea
> what type of archives were on it to see if it looked like data? What
> should be on a brand new tape? I'd like to be able to determine if the
> tapes have been used. Help from anyone would be much appreciated.
a) you can try to read specific segments from the tape with
ftmt -f /dev/nqft0 rdftseg #SEGID. This will read an arbitrary
segment from the tape. Actually, this should fail for #SEGID > 2 on
a newly formatted tape, because on a newly formatted tape the ECC
information is missing for most segments, with the exception of the
2 header segment and the volume table segment.
If rdftseg succeeds you can look at the data with a hex
editor. This test is not failsafe. Sometimes there are README's and
stuff written to the tape. At least for some Ditto Max cartridges.
b) You can look at the fields in the header segments. Each decent
floppy tape driver records the total number of segments written,
formatted or verified at byte offset 130 in the header segment.
For a first-time formatted tape, this value should be 2 times as
large as the number of segments on tape.
Further interesting fields:
130-133: number of segments written verified or formatted through
lifetime of tape
142-143: number of times tape has been formatted.
Either use the rdftseg stuff and a hexeditor or hexdump to look at
those fields, or use
ftformat -f /dev/nqft0 --print-header --mode=probe > /tmp/myfoo
Then /tmp/myfoo will contain a dump of the info contained in the
header segment in more or less human-readable form. Note that this
will take some minutes because ftformat tries to calibrate the tape
length. "--mode=probe" means NOT to format the tape.
Example output from a TR-3 tape:
SIGNATURE: 0xaa55aa55
FMT_CODE: 0x04
REV_LEVEL: 0x00
HSEG_1: 0
HSEG_2: 1
FRST_SEG: 2
LAST_SEG: 54199
FMT_DATE: "23:37:27 07/20/98"
WR_DATE: "03:45:06 07/11/00"
SPT: 1084
TPC: 50
FHM: 53
FTM: 254
FSM: 128
LABEL: "Ftape - The Linux Floppy Tape Project! "
LABEL_DATE: "23:37:27 07/20/98"
CMAP_START: 0
----> FMT_ERROR: 0xff
----> SEG_CNT: 146034
INIT_DATE: "00:00:00 01/01/70"
----> FMT_CNT: 2
FSL_CNT: 0
MK_CODE: ""
LOT_CODE: ""
The "---->" point to interesting fields. FMT_ERROR == 0xff means the
tape was reformatted and the data initially stored in the header
segments was lost, "SEG_CNT" and "FMT_CNT" like explained above.
Claus
--
Claus-Justus Heine
[EMAIL PROTECTED]
http://www.instmath.rwth-aachen.de/~heine/
Ftape - the Linux Floppy Tape Project
Home Page : http://www.instmath.rwth-aachen.de/~heine/ftape/
Mailing-list: [EMAIL PROTECTED]