Académique Documents
Professionnel Documents
Culture Documents
This is a followup to the quoted message below, which I'd sent to the redhat-list
12 days
ago.
Apart from an encouraging note from listmember Sid Cowles, who had privately and
graciously
offered to read my tapes on his SGI box (which I declined with thanks), I was
surprised that no one
on this list had anything to say on the matter.
So, I did some digging around, starting first with the reference anyone serious
about sysadmin
should consult right away:
Unix System Administration Handbook, 3rd Edition
http://www.amazon.com/exec/obidos/ASIN/0130206016/survivalarts-20
I then consulted the Linux edition by the same core writers:
Linux Administration Handbook
http://www.amazon.com/exec/obidos/ASIN/0130084662/survivalarts-20
After that, I finally consulted the book which seems to have given me the critical
clues I needed (those clues being "IRG [interrecord gap]" and "reading past the
IRG to
determine block size"):
UNIX Backup and Recovery (O'Reilly & Associates)
http://www.amazon.com/exec/obidos/ASIN/1565926420/survivalarts-20
The sharp-eyed will note that I have indeed tagged those URLs with merchant
IDs (mine). If you find this writeup to be useful, please use those URLs to visit
Amazon
and *buy those books* if you haven't already.
OK, here's what I did...
I have 3 classes of tapes written 9 years ago with tar, cpio, and bru.
those tapes
I'd originally written with 'tar cvBf /dev/tape' on my Irix boxes:
1.) Check status of tape:
[localhost]# mt -f /dev/st0 status
SCSI 2 tape drive:
First,
Let's see:
[localhost]# ls -l testfile
-rw-r--r-1 root
root
OK, file's there. Let's see if I could have used the next smallest blocksize and
still
have been successful:
[localhost]# dd if=/dev/st0 of=testfile2 ibs=255k count=1
dd: reading `/dev/st0': Cannot allocate memory
0+0 records in
0+0 records out
No.
Let's confirm that what I wrote 9 years ago on the tape's paper label is true
(i.e. that I'm looking at a 'tar' archive):
[localhost]# file testfile
testfile: POSIX tar archive
Cool.
Knowing what type of archive I have, and what its blocksize is, I try this:
Now for the tapes I had written with 'cpio -ovBc -O /dev/tape', also about 9 years
ago:
After ejecting the old tape, putting in the 'cpio' archive tape and confirming
that the
device is at BOT (beginning of tape) and still set to variable block size ("0"):
[localhost]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (45010000):
BOT WR_PROT ONLINE IM_REP_EN
As a shortcut to determining blocksize for this tape - on the assumption that I
didn't trust
the "B" argument I'd passed to 'cpio' 9 years ago on my Irix desktop, I tried the
'dd' command which
had worked to read the first block off the 'tar' tape:
[localhost]# dd if=/dev/st0 of=testfile ibs=256k count=1
0+1 records in
10+0 records out
[localhost]# ls -l testfile
-rw-r--r-1 root
root
Looks like the 256k blocksize was overkill, but doubly gratifying to see 'dd'
working as
advertised: it stopped reading at the first IRG. Cool.
Another check to confirm that my tape's paper label was correct:
[localhost]# file testfile
testfile: ASCII cpio archive (SVR4 with no CRC)
Great! OK, a little reading of the 'cpio' man page, a couple of trials, and I
find this
incantation is the one required to recover archives from that tape: