1832963 Members
2681 Online
110048 Solutions
New Discussion

Face untar problem

 
Achilles_2
Regular Advisor

Face untar problem

Hi all,

I have encountered the problem about untar the tape in HP-UX 11.00 machine. The status of driver and tape are:

Drive: HP C1537A
Format: DDS-2 format

I extract it via unix command:
> tar tv /dev/rmt/0m

and then it shows the following errors
Tar: blocksize = 2
directory checksum error

Any suggestions welcome

Alex
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: Face untar problem

That error could be several things.

1) Are you absolutely positive that the tape was created with tar? If it wasn't tar will NOT work to extract the files.

2) The tape could have gone bad. Can you read other tapes? Have you tried running a cleaning cartridge through the drive?

3) The tape was create with a different block size than the default. Can you talk to the person that created it?

4) Was it created with tar on a different type of Unix system? Was it created with Gnu tar rather than the normal HP-UX tar?

At this point we don't have a whole lot to go on.
T G Manikandan
Honored Contributor

Re: Face untar problem

I would add

First check which backup format the tape is,

#dd if=/dev/rmt/0m of=/tmp/tapeformat bs=1K count=2

Now check that file as which backup format is that.

Then you can proceed.
Achilles_2
Regular Advisor

Re: Face untar problem

Hi,

I checked that the tape is created using "make_tape_recovery" method and created under HP-UX 11.0. It is the same as my machine.

How to able to read its content and extract some files on the tape.

Thanks you for your help.

Alex
T G Manikandan
Honored Contributor

Re: Face untar problem

Then do a

#mt -f /dev/rmt/0mn fsf 1
#tar tvf /dev/rmt/0mn /etc/passwd
Con O'Kelly
Honored Contributor

Re: Face untar problem

Hi

Try using:

# mt -t /dev/rmt/0mn fsf 1
# tar xvf /dev/rmt/0mn

man make_tape_recovery has details on extracting single files from the tape archive.

Cheers
Con
Jeroen Peereboom
Honored Contributor

Re: Face untar problem

Alex,

for your information: a recovery tape consists of 2 'files' on the tape. The first is a bootable part, the second is a tar archive. That's why you need to skip forward 1 'file' before using tar (from the no-rewind device).

JP.
Achilles_2
Regular Advisor

Re: Face untar problem

JP,

I try but it still display an error:

root@hkdev:/ # mt -f /dev/rmt/0mn rew
root@hkdev:/ # mt -f /dev/rmt/0mn fsf 2
root@hkdev:/ # tar tvf /dev/rmt/0m
directory checksum error

Alex

Kari Pannila
Frequent Advisor

Re: Face untar problem

>root@hkdev:/ # mt -f /dev/rmt/0mn rew
>root@hkdev:/ # mt -f /dev/rmt/0mn fsf 2
>root@hkdev:/ # tar tvf /dev/rmt/0m
>directory checksum error

Could you try the commands you were instructed to use (1 != 2) by Con and TG:

mt -f /dev/rmt/0mn fsf 1


BR Kari
Kari Pannila
Michael Schulte zur Sur
Honored Contributor

Re: Face untar problem

Hi,

since tar does recognize it as archive, it must be a bad tape. Have you tried on another machine?

Michael
Lethuillier
Frequent Advisor

Re: Face untar problem

According to http://amor.cms.hu-berlin.de/~h0444idm/pub/sun/sun-trap3e ;

tar: directory checksum error

Cause

This error message from tar(1) indicates that the checksum of the directory and the files it has read from tape does not match the checksum advertised in the header block. Usually this indicates the wrong blocking factor, although it could indicate corrupt data on tape.

Action

To resolve this problem, make certain that the blocking factor you specify on the command line (after -b) matches the blocking factor originally specified. If in doubt, leave out the block size and let tar(1) determine it automatically. If that doesn't help, tape data could be corrupted.


-------------------------------------------
Are you using the recommended GNUtar, or standard tar?

Download GNU tar, run "configure", "make", then "make install" ;

ftp://alpha.gnu.org/gnu/tar/tar-1.13.93.tar.gz


Il faut avoir la foi et non les foies - Il faut avoir la forme et non les formes - Il faut faire la paix et non des pets
Jeroen Peereboom
Honored Contributor

Re: Face untar problem

Alex,

as Kari says: you must do mt fsf 1 (one).
NOT 2 (two). You must skip (forward) one file, which is the bootable one. Then the tape is positioned just before the tar archive.

JP.