Amanda-Users

Re: tape spanning problem with 2.5.2-20070523

2007-06-06 17:24:30
Subject: Re: tape spanning problem with 2.5.2-20070523
From: Jean-Francois Malouin <Jean-Francois.Malouin AT bic.mni.mcgill DOT ca>
To: AMANDA users <amanda-users AT amanda DOT org>
Date: Wed, 6 Jun 2007 14:29:34 -0400
* Jean-Francois Malouin <Jean-Francois.Malouin AT bic.mni.mcgill DOT ca> 
[20070604 15:58]:
> * Jean-Louis Martineau <martineau AT zmanda DOT com> [20070601 09:55]:
> > You can't retrieve the split_file separately, you must concatenate them 
> > before untaring.
> > You can use amfetchdump:
> > amfetchdump <-p -d /hw/tape/tps21d1nrnsv <config> yorick 
> > /data/narsad/narsad1 20070530 | /usr/freeware/bin/tar -tf -
> > 
> > or:
> > mt -f /hw/tape/tps21d1nrnsv rewind
> > mt -f /hw/tape/tps21d1nrnsv fsf 1
> > dd if=/hw/tape/tps21d1nrnsv bs=32k skip=1 > part1
> > dd if=/hw/tape/tps21d1nrnsv bs=32k skip=1 > part2
> > cat part1 part2 | /usr/freeware/bin/tar -tf -
> 
> Thanks Jean­Louis for the explanation. I tried and it worked.
> 
> Is amrecover useless to restore files from spanning tape DLEs? I just
> did another test trying to restore a file that's 'split' across 2
> chunks and it fails with:
> 
> could not fsf /hw/tape/tps22d2nrnsv: No space left on device
> tar: Unexpected EOF in archive
> tar: Unexpected EOF in archive
> tar: Error is not recoverable: exiting now
> Extractor child exited with status 2
> amrecover> 
> 
> The file got partly extracted from tape but differs in size and
> perm/ownner from the original as tar didn't complete normally.
> I read from the wiki 
> http://wiki.zmanda.com/index.php/How_To:Split_Dumps_Across_Tapes#amrecover
> that amrecover is 'span-aware'...
> How can I restore that file without pulling the whole DLE from tape?
> 
> Another problem I get in amrecover is that I can't 'add' a file
> directly from the root directory, I have to cd to the subdir and then
> 'add' it:
> 
> amrecover> add 
> jenkai/McGill/data-minc/football/MF030/20050902_140405_9_mri.mnc.gz
> File jenkai/McGill/data-minc/football/MF030/20050902_140405_9_mri.mnc.gz 
> doesn't exist in directory
> amrecover> cd jenkai/McGill/data-minc/football/MF030-/
> /data/concussion/concussion1/jenkai/McGill/data-minc/football/MF030
> amrecover> add 20050902_140405_9_mri.mnc.gz
> Added file 
> /jenkai/McGill/data-minc/football/MF030/20050902_140405_9_mri.mnc.gz
> 
> Never noticed that before but is this the normal behaviour?
> 
> thanks!
> jf

No one seems to be answering this one so let me continue with some
more problems. Just completed a spanning tape DLE on a testing
system and now I get:

wart 217# /opt/amanda/spantest/sbin/amfetchdump -p -d \
/hw/tape/tps6d4nrnsv spantest wart /bigdisk 20070605 | \
/usr/freeware/bin/tar -tf -
2 tape(s) needed for restoration
The following tapes are needed: spantest-000010 spantest-000011
Press enter when ready

no tapedev specified
amfetchdump: error reading file header: Bad file number
Not an amanda tape
Looking for tape spantest-000010...
no tapedev specified
amfetchdump: error reading file header: Bad file number
Not an amanda tape
Looking for tape spantest-000010...
no tapedev specified
amfetchdump: error reading file header: Bad file number
Not an amanda tape
Insert tape labeled spantest-000010 in device (null)
and press enter, ^D to finish reading tapes

Can't tell more than that as no debug files seem to be generated.
Got the same error with 2.5.2-20070523 and 2.5.2-20070606.
tapedev is defined in both amanda.conf and amanda-client.conf 
and set to "/hw/tape/tps6d4nrnsv"...

Looking at the tape headers:

 dd if=/hw/tape/tps6d4nrnsv bs=32k count=1
AMANDA: TAPESTART DATE 20070605160209 TAPE spantest-000010
014
1+0 records in
1+0 records out

mt -f /hw/tape/tps6d4nrnsv rewind
mt -f /hw/tape/tps6d4nrnsv fsf 1
dd if=/hw/tape/tps6d4nrnsv bs=32k count=1
AMANDA: SPLIT_FILE 20070605160209 wart /bigdisk  part 1/-1  lev 0 comp
N program /usr/freeware/bin/tar
To restore, position tape at start of file and run:
        dd if=<tape> bs=32k skip=1 |      /usr/freeware/bin/tar -xpGf - ...

1+0 records in
1+0 records out

Notice the extra '014' which is extra-stuff that got put there when
I first labeled the tapes with a amanda version that had an option to
od incompatible with the irix version.

I'm inclined to say from my 'experiments' over the last few weeks that
tape spanning is still not a 'matured' feature and I would be very
nervous to have that in my production environment. 

jf

> 
> 
> > 
> > 
> > 
> > Jean-Francois Malouin wrote:
> > >Hi,
> > >
> > >Looks like tape spanning is failing. I can't recover
> > >the DLE and looking at the actual content of the tape:
> > >
> > >AMANDA: SPLIT_FILE 20070530 yorick /data/narsad/narsad1  part 1/2  lev 1 
> > >comp
> > >N program /usr/freeware/bin/tar
> > >AMANDA: SPLIT_FILE 20070530 yorick /data/narsad/narsad1  part 2/2  lev 1 
> > >comp
> > >N program /usr/freeware/bin/tar
> > >[...]
> > >
> > ># mt -f /hw/tape/tps21d1nrnsv fsf 1
> > ># dd if=/hw/tape/tps21d1nrnsv bs=32k skip=1 | /usr/freeware/bin/tar -tf -
> > >[...]
> > >./analysis/s17/04mm/kadulina_yara_20050727_105815_3_mri_MC.log
> > >./analysis/s17/04mm/kadulina_yara_20050727_105815_3_mri_MC.mnc
> > >./analysis/s17/04mm/kadulina_yara_20050727_105815_4_mri.mnc
> > >327679+0 records in
> > >327679+0 records out
> > >/usr/freeware/bin/tar: Unexpected EOF in archive
> > >/usr/freeware/bin/tar: Error is not recoverable: exiting now
> > >
> > ># mt -f /hw/tape/tps21d1nrnsv rewind
> > ># mt -f /hw/tape/tps21d1nrnsv fsf 2
> > ># dd if=/hw/tape/tps21d1nrnsv bs=32k skip=1 | /usr/freeware/bin/tar -tf -
> > >/usr/freeware/bin/tar: This does not look like a tar archive
> > >/usr/freeware/bin/tar: Skipping to next header
> > >/usr/freeware/bin/tar: Archive contains obsolescent base-64 headers
> > >253158+0 records in
> > >253158+0 records out
> > >/usr/freeware/bin/tar: Error exit delayed from previous errors
> > >
> > >Any ideas?
> > >jf
> > >  
> 
> -- 
> <° ><

-- 
<° ><

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