Amanda-Users

Stupid bogus tape EOF tricks

2003-04-24 17:10:49
Subject: Stupid bogus tape EOF tricks
From: "C. Chan" <cchan AT surya.bsd.uchicago DOT edu>
To: amanda-users AT amanda DOT org
Date: Thu, 24 Apr 2003 16:06:16 -0500 (CDT)
I had a recent opportunity to put Amanda through her paces while
restoring ~100GB orphaned by yet another failed IDE drive.  There
were no problems except for one 12GB partition.  When piping from
amrestore to GNU tar the restore aborts with an "unexpected EOF".
This occurs about 680MB into the restore.

The Amanda backup logs show that 12GB were written to the backup
tape successfully.  Also if I forward to the next file on tape
the tape does advance about 12GB.  So it looks like the tar file
was written to tape but somehow a bogus EOF marker was written
into the archive, or there may be a bad patch on the tape.  The
other archives on the tape were readable without incident.

The first thing I tried was to try to read past the bad spot using
a version of tar which continues to read past various errors, but
amrestore stalled at the bad EOF marker again.  dd does the same
thing.  So I tried using dd to read up to the bad EOF marker, and
write the tape data to disk, then use "mt fsr" to advance past
the EOF marker, and write the rest of the tar archive to disk,
and then splice the files together. The first part works fine
but when I try to read past the bogus EOF to the true end of
the tar file, dd fails with 

dd:
reading /dev/nst4: Input/output error
0+0 records in
0+0 records out

I experimented with different ibs= settings and spacing forward a
number of records but without any better result.

Are there any standard tools better tools than dd for extracting
the data record by record from a tape?  I recall reading an article
in an issue of SysAdmin magazine where the admin found a way to read
the tape backwards from the end of archive to the bad spot, but I
don't know if it's possible with an 8mm tape drive.


----
C. Chan <c-chan AT uchicago DOT edu >
GPG Public Key registered at pgp.mit.edu 

<Prev in Thread] Current Thread [Next in Thread>