Gunzip tar A directory checksum error on media


 
Thread Tools Search this Thread
Operating Systems AIX Gunzip tar A directory checksum error on media
# 1  
Old 01-20-2013
[Solved] Gunzip tar A directory checksum error on media

Hi,

what is the directory checksum error ?

Code:
# 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.


Code:
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:

Quote:

many gzip utilies cannot handle file sizes > 2GB

If you use gzip in a pipe, it will not have any of these problems:
# tar cf - source | gzip -9 > backup.tar.gz
In this case, the filesystem itself will become the limiting factor.

Also, if you copy using scp, either your scp client or server could
become the limiting factor. To avoid this also, use a pipe again:
# tar cf - source | ssh server 'cd /path/to/dir ; gzip -9 > backup.tar.gz'
And I did use gzip but got the same error
tar version tar-1.14-2

Code:
# 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
https://www.unix.com/aix/188595-solve...ftp-issue.html
http://unix.ittoolbox.com/groups/tec...r-untar-211947
tar -xvf doesnt work
Tar error

Last edited by filosophizer; 01-20-2013 at 02:13 PM..
# 2  
Old 01-20-2013
Quote:
Originally Posted by filosophizer
Code:
# gunzip < /ebs2/test4.tar.gz | tar -xvf -

You might want to use this to unpack:

Code:
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
# 3  
Old 01-22-2013
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/aixtool....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/aixtool...owerpc.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)
# 4  
Old 01-22-2013
Quote:
Originally Posted by MichaelFelt
Now, normal tar may not like a file larger than 2G and this may be your issue.
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.

Quote:
Originally Posted by MichaelFelt
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)
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
This User Gave Thanks to bakunin For This Post:
# 5  
Old 02-05-2013
Problem solved. The Moderator can change the title of the thread.

Thanks for all those who participated in this thread.

Moderator's Comments:
Mod Comment edit by bakunin: Your wish shall be my command. Done.

Last edited by bakunin; 02-05-2013 at 06:24 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Gunzip and tar command

Hi I wanted to tar and gunzip a file named backup tar: backup.tar: Wrote only 2244 of 10240 bytes tar: Error is not recoverable: exiting now Please tell me what I am doing wrong? Please do help. (4 Replies)
Discussion started by: sonia102
4 Replies

2. UNIX for Dummies Questions & Answers

gunzip - Directory size

Hello, Directory name : FIRST ( 28 files - directory size 27043 Mo ) Here is what I ve done : tar cvf FIRST.tar FIRST Then gzip FIRST.tar So far evrything's fine then, I've used GUNZIP and extract the TAR. I used DIFF to check if there is no difference between files (extrat Vs... (1 Reply)
Discussion started by: Aswex
1 Replies

3. Shell Programming and Scripting

"directory checksum error" when attempting to install tcl

OS: HP-UX Programs I want to install: expect and tcl I'm lost. I bought the book. I began reading the book. I want to install expect. I've been able to download the .z, and extract it successfully. But, of course, it apparently needs tcl and possibly tk also, and ... I... (0 Replies)
Discussion started by: instant000
0 Replies

4. Shell Programming and Scripting

Elegant gunzip of tar Contents

I am faced with a situation where I have directories of gunzipped contents bundled into a tar file. It might look something like this. x coop/batch/bin/ha90x20.gz, 632641 bytes, 1236 tape blocks x coop/batch/icm/HA90X20.icm.gz, 1821 bytes, 4 tape blocks x coop/batch/aeenv.gz, 4117 bytes, 9 tape... (2 Replies)
Discussion started by: scotbuff
2 Replies

5. UNIX for Dummies Questions & Answers

directory checksum error

Hi, I have a tar file with naed ass bcs.tar.gz downlaoded to my work station and It contains all the .c files and .o which i needed. when i am trying to unzip this one i am facing directory checksum error. What does it mean.How to resolve this. I tried with tar -xf and tar -tvf... (2 Replies)
Discussion started by: jagan_kalluri
2 Replies

6. Shell Programming and Scripting

Retaining tar.gz after gunzip

gunzip fnam.tar.gz After this command execution... .gz file no longer exists... and only fnam.tar is present. Is it possible to retain the tar.gz file after after using the above command thx in advance. (4 Replies)
Discussion started by: devs
4 Replies

7. Filesystems, Disks and Memory

Directory is Same but Checksum is different

Hello, I am performing a checksum on our software we have installed on a unix solaris 2.0 os. If the checksum generated report is not the same as a 'Gold' report we have on disk. Then our software is deleted, and reinstalled. The problem I am having is if you run the program again, the... (3 Replies)
Discussion started by: JustinPyfrom
3 Replies

8. UNIX for Dummies Questions & Answers

directory checksum error

Display warnning:directory checksum error in the end of Decompress the bag (0 Replies)
Discussion started by: renrongwen
0 Replies

9. Shell Programming and Scripting

Tar and gunzip piping

I am using IRIX 6.5.11 and tcsh. I have created an arcihive by using the command "tar -cvf - /stuff/ /more/stuff|gzip --best>/stuff.tar.gz" It made an archive of my files without taking up huge amounts of disk space with uncompressed files. How do I extract files from the archive without... (2 Replies)
Discussion started by: madyodacolon
2 Replies

10. Solaris

Combination of gunzip and tar on Solaris

Hello I'm trying to use a combination of gunzip and tar to unpack and unzip a *.tar.gz file. I tried gunzip ~/myfile.tar.gz | gtar -x This will unzip the file, but it won't unpack. Any hints? thanks a lot Dan (5 Replies)
Discussion started by: dwidmer
5 Replies
Login or Register to Ask a Question