1828215 Members
2459 Online
109975 Solutions
New Discussion

Problem with tar

 
David_550
Advisor

Problem with tar

Hi,
I have the following problem with tar:
tar -tvf /dev/rmt/0m
Tar: blocksize = 2
directory checksum error

what is the problem and how i can resolve it?
Please help

Thanks
David
13 REPLIES 13
Patrick Wallek
Honored Contributor

Re: Problem with tar

Was the tape you are attempting to read originally created with tar?
Robert-Jan Goossens
Honored Contributor

Re: Problem with tar

Hi David,

Try to check the file
# file tar_file
tar_file: tar file

did you ftp the file whit binary mode ?

maybe a corrupt file, try and redownload it again.

HTH,
Robert-Jan
Kent Ostby
Honored Contributor

Re: Problem with tar

Try frecover on the tape if you are unsure of how it was created.

or cpio for that matter.

Every once in a while I get passed a cpio tape from someone and it catches me off guard.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Robert-Jan Goossens
Honored Contributor

Re: Problem with tar

David,

check this doc.

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062965233

Document description: Why does tar(1) report directory checksum error
Document id: A1327736

Hope this helps,
Robert-Jan
sathyajith
New Member

Re: Problem with tar

Hi David,

This error may be due to following reason

1. Corrupted files.
2.Bad block in hard disk ( while you taking backup).
3.Problem with media or DDS(tape) drive.
3.Incompatability of drive and media
4.format you used to take backup.( If you are trying to read the backup which you took with cpio or fback it will give you this problem)

Thanks

Sathya
Alzhy
Honored Contributor

Re: Problem with tar

If you've temp space and know the size of the tar file on the tape, do:

root# dd if /dev/rmt/0m|of /bigfs/tarfile.tar

root# file /bigfs/tarfile.tar

Chances are it is cpio, compressed or gzipped for which you need to use other utilities ie:

cpio -idvmucat /bigfs/tarfile.tar|gunzip|tar tvf -
cat /bigfs/tarfile.tar|uncompress|tar tvf -

...

HTH.
Hakuna Matata.
V. Nyga
Honored Contributor

Re: Problem with tar

Hi David,

some more informations would be nice ...
Is it a tape? Is it from SGI workstation?
Do you have a tar-file? From windows?
Have you tried to rename it with extension .gz and to gunzip it?
Or unzip in windows?

Only some ideas ...

Volkmar
*** Say 'Thanks' with Kudos ***
Steve Steel
Honored Contributor

Re: Problem with tar

Hi


Try

dd if=/dev/rmt/0m bs=10k | tar tvf -

Suspect tape is not compatible with drive or drive is broken.


Can you make a new backup with tar on a blank tape and read it back.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
David_550
Advisor

Re: Problem with tar

Thanks, the problem was the operator user.

Thanks
Muthukumar_5
Honored Contributor

Re: Problem with tar

Some tape files may use different blocking size. If we try to read the file whose blocking size is different from their actual written block size.

To prevent this use a blocking
factor of 1 can be used, although performance may be reduced somewhat. Use with -b 1 on tar file

More informations are given over tar man page on b option as,

----------------

Use the next arg argument as the blocking factor for archive
records. The default is 20; the maximum is at least 20.
However, if the f - modifier is used to specify standard
input, the default blocking factor is 1.

The blocking factor is determined automatically when reading
nine-track tapes (key letters x and t). On nine-track
tapes, the physical tape record length is the same as the
block size. The block size is defined as the logical record
size times the blocking factor (number of logical records
per block).
The blocking factor must be specified when reading flexible
disks and cartridge tapes if they were written with a
blocking factor other than the default.
If a tar file is read using a blocking factor not equal to
the one used when the file was written, an error may occur
at the end of the file but there may or may not be an actual
error in the read. To prevent this problem, a blocking
factor of 1 can be used, although performance may be reduced
somewhat.
tar writes logical records of 512 bytes, independent of how
logical records may be defined elsewhere by other programs
(such as variable-length records (lines) within an ASCII
text file).

Easy to suggest when don't know about the problem!
V. Nyga
Honored Contributor

Re: Problem with tar

Sometimes the problem is between chair and keyboard ;-)))

V.
0 pts. please
*** Say 'Thanks' with Kudos ***
yy_3
New Member

Re: Problem with tar

testing
Bharat Katkar
Honored Contributor

Re: Problem with tar

David,
Don't mind but try to understand the scale 1-10. If you are assigning 1 point that means the answer is irrelevent to question but i didn't see any of the answers of that kind. See the link below on point assignment.
http://forums1.itrc.hp.com/service/forums/helptips.do?admit=716493758+1085211538437+28353475#33


Regards,

ps. Muthukumar, never mind .. this will count somewhere else :))

You need to know a lot to actually know how little you know