Gunzip tar A directory checksum error on media

Hi,

what is the directory checksum error ?

# sed 's/^M$//' test4_bkp_19Jan13.tgz | tar -tvf -
tar: 0511-169 A directory checksum error on media; -265745505 not equal to 76225.

# mv test4_bkp_19Jan13.tgz test4.gz
# gunzip < /ebs2/test4.gz | tar -xvf -
tar: 0511-169 A directory checksum error on media; 804399360 not equal to 12401.

# mv test4.gz test4.tar.gz

# gunzip < /ebs2/test4.tar.gz | tar -xvf -
tar: 0511-169 A directory checksum error on media; 804399360 not equal to 12401.
# gunzip -c test4.tar.gz | tar -xvf -
tar: 0511-169 A directory checksum error on media; 804399360 not equal to 12401.

# gunzip -tv test4.tar.gz
test4.tar.gz:

It seems to work with smaller files < 2G but when I trying to tar and zip a 140GB filesystem, it will tar and zip into 20GB
# tar -cvf - /oracle | gzip > /test4/test4.tgz
it will work fine,

but when unzipping it and untar it, I get this error
tar: 0511-169 A directory checksum error on media; 804399360 not equal to 12401.

cat /etc/security/limits
default:
        fsize = -1
        core = -1
        cpu = -1
        data = -1
        rss = -1
        stack = -1
        nofiles = -1
        fsize_hard = -1
        core_hard = -1
        cpu_hard = -1
        data_hard = -1
        stack_hard = -1
        rss_hard = -1
        nofiles_hard = -1

someone mentioned:

And I did use gzip but got the same error
tar version tar-1.14-2

# gunzip -d *.gz /oracle/

gunzip: test4.tar: No space left on device


# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           1.00      0.82   18%     1698     1% /
/dev/hd2           2.50      0.94   63%    29111    12% /usr
/dev/hd9var        1.00      0.74   27%      400     1% /var
/dev/hd3           1.00      0.90   11%       49     1% /tmp
/dev/hd1           1.00      0.77   23%       74     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       0.50      0.40   21%     2353     3% /opt
/dev/fslv01        9.00      9.00    1%        4     1% /oracle/archive
/dev/fslv00      151.00    150.98    1%        5     1% /oracle
/dev/fslv02       21.00      0.24   99%        5     1% /ebs2
#

references:
tar and gzip with pipe not working

http://unix.ittoolbox.com/groups/technical-functional/ibm-aix-l/how-to-uncompress-or-untar-211947

You might want to use this to unpack:

gzip -cd /path/to/file.tar.gz | tar -xf -

Be sure to make the root directory of the restore your PWD before, because "tar" will unpack in the current directory if you tarred with relative paths (as is advised).

I hope this helps.

bakunin

1) I prefer bzip2 to gzip - seems to work better
2) gzip -t xxx.gz # test gzip file itself

Now, normal tar may not like a file larger than 2G and this may be your issue.

A program I recently learned about is GNU tar - needed it to unpack an archive, and I have packaged it for AIX at http://dl.aixtools.net/tools/aixtools.gtar.1.26.0.0.I.xz

This is stored as an xz archive, so you will need xz to unpack it, or also load xz for AIX from http://dl.aixtools.net/tools/aixtools.xz.powerpc.5.0.3.I

p.s. using xz to pack will take longer, but should be smaller.
p.p.s. gtar unpacks as /opt/bin/tar - so to have it as your default - change your PATH variable. Your post mentioned tar.1.14 - so I am guessing both are GNU tar, and mine is a newer version.

Hope this helps (and that I am not breaking any rules by posting to a place where I put things - if so, admins please be nice, I am not intending to break any rules)

This used to be the case but the limitation has been lifted somewhere in 5.x (can't remember the exact version). There is still a 8GB limit (for individual files, not the archive) in place because of the UStar (Uniform Standard Tape Archive) standard.

To make it as clear as i am able to put it: posting links is not forbidden at all, but practically limited by the following "rule": as long as the primary goal of the link is conceivably to help the thread owner / general audience all is fine. If it looks like the primary intention was not so much help but (self)-promotion the moderators will act.

As we (the moderators) are people we try our best but are not above error. I (and i am sure the other team members see it similarly) have no problem revising wrong decisions once i learn better. On the other hand i do this job for more than 6 years now and if it walks like a duck and quacks like a duck then in most cases it is a duck.

I have told you so in a PM and i repeat it here publicly: i welcome any sincere effort to help others and i am especially glad when the board i work for is attractive for experts like you. So as long as i see this sincere effort to help i am willing to cut you any slack you need to carry out this help. Right now i don't have the feeling you are overusing this, so i see no reason to act. Once this feeling of mine changes you will be the first one to know.

bakunin

1 Like

Problem solved. The Moderator can change the title of the thread.

Thanks for all those who participated in this thread.