1834167 Members
2708 Online
110064 Solutions
New Discussion

Tar Errors on HP-UX11

 
Prathap_1
Advisor

Tar Errors on HP-UX11

Hi
I am trying to view the contents of tape on HP-UX B.11.00 operating system. When i give the command tar -tvf /dev/rmt/3m, i am getting the errors called Tar: Tape blocksize error and Directory checksum errors. Can you suggest me how can i overcome this problem.

Thanks
Prathap.
7 REPLIES 7
Helen French
Honored Contributor

Re: Tar Errors on HP-UX11

Helen French
Honored Contributor

Re: Tar Errors on HP-UX11

Hi,

If you need to read the content, you can use the pax command too:

# mt -t /dev/rmt/3m ( rewinding tape)
# pax -r -f /dev/rmt/3m

Also make sure that the media is good, the command used for backing up data and the device file you are using are right.

HTH,
Shiju
Life is a promise, fulfill it!
Prathap_1
Advisor

Re: Tar Errors on HP-UX11

Hi
Thanks for the info. In addition to my previous question, How can i get the blocksize used while taking the backups. I don't know the blocksize used while taking the backups, then how can i read the contents of the tape without using the blocksize.

Thanks
Prathap
Helen French
Honored Contributor

Re: Tar Errors on HP-UX11

Frank Slootweg
Honored Contributor

Re: Tar Errors on HP-UX11

I can not view Shiju's link, so I do not know if that already answered this question:

> How can i get the blocksize used while taking the backups? I don't know the blocksize used while taking the backups, then how can i read the contents of the tape without using the blocksize?

You can get the blocksize by doing:

dd if=/dev/rmt/3m of=/tmp/record bs=64k count=1
ll /tmp/record

The size of the /tmp/record file is the blocksize (in bytes). I.e. the above dd(1) command reads one record with a *maximum* size of 64KByte and returns the *actual* record.

Helen French
Honored Contributor

Re: Tar Errors on HP-UX11

Frank,

This is the link:

Problem Description

I would like to retrieve data from some tapes, but I can't read
them. They were written in tar format, but tar returns a directory
checksum error. Is there anything I can do?


Solution

To retrieve data from tapes, execute the following procedure:

1. Put tape in DDS drive.

2. Execute the following:

dd if=/dev/rmt/ of=/tmp/tapetest bs=1K count=2

3. To determine the file type do:

file /tmp/tapetest

The file command returns the answer that this is a cpio archive.

4. In order too read the cpio archive without recovering the data,
complete the following:

/bin/cpio -ictvB < /dev/rmt/

The B option may or may not be needed dependent on what command
was used to store the data in the first place.

HTH,
Shiju

Life is a promise, fulfill it!
Frank Slootweg
Honored Contributor

Re: Tar Errors on HP-UX11

Shiju,

Good point! Perhaps the tape is not a tar tape, but a cpio or other tape. The file(1) command in your example should reveal if it is a tar tape, a cpio tape or something else.