LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-25-2011, 03:59 PM   #1
xzased
LQ Newbie
 
Registered: Jan 2008
Posts: 20

Rep: Reputation: 0
Zip file corrupted, works fine issuing remounts


Hi, Im trying to zip over 40,000 xml files into different zip archives. Everything goes ok until zip starts showing the following error:

Code:
  adding: 1435578.xml (deflated 62%)
	zip warning: extended local header not found for 1435578.xml

zip error: Zip file structure invalid
This starts happening to all files I input regardless of the zip archive they are going to, even if I move the corrupt archives and start with fresh ones. The command I use to zip them is:
Code:
zip -j xmlarchive.zip /path/to/file.xml
The location of the files and the zip archives are in a samba share. My fstab looks like this:
Code:
//10.13.109.188/storage  /media/storage   cifs    user=admin,password=adM1n@33,noperms 0 0
What is strange about this is that when I unmount/remount the drive, everything works allright (I still have to move the corrupted zips to another location and start with a fresh archive). Can anyne help me find out what is going on? Both my machines are running red hat 5.3
 
Old 08-25-2011, 04:41 PM   #2
metalhead201
LQ Newbie
 
Registered: Aug 2011
Location: San Francisco
Distribution: Kubuntu, CentOS
Posts: 11

Rep: Reputation: Disabled
Does it have to be zip? Can you use tar and then gzip?

Syntax:
tar -cf xmlarchive.tar /path/to/file.xml
gzip xmlarchive.tar

Try that and see if it works. I wonder if there's a bug in zip? I rarely use it and almost always use tar and gzip instead.
 
Old 08-25-2011, 05:00 PM   #3
xzased
LQ Newbie
 
Registered: Jan 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Unfortunately it has to since we have other users retrieving data who don't know anything but zip. My version of zip is 2.31, I've read on info-zip's site about it, but cant find an issue with it. I'll try to update to 3.0 and see if that takes care of it. I just find the unmount/remount part strange and wonder if it has anything to do with it
 
Old 08-25-2011, 05:17 PM   #4
metalhead201
LQ Newbie
 
Registered: Aug 2011
Location: San Francisco
Distribution: Kubuntu, CentOS
Posts: 11

Rep: Reputation: Disabled
OK, try this. I'm no expert at zip, but am pretty good at debugging things.

Take that bad zip file out and move it elsewhere. There may be something wrong with 1435578.xml.

Then see if you can zip the rest up. Let's debug to see if it's the file itself that is bad.
 
Old 08-25-2011, 05:26 PM   #5
xzased
LQ Newbie
 
Registered: Jan 2008
Posts: 20

Original Poster
Rep: Reputation: 0
I move the once that fail to a temporary directory, I can zip them ok once I remount the filesystem.
 
Old 08-26-2011, 05:30 PM   #6
xzased
LQ Newbie
 
Registered: Jan 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, I think Im getting somewhere now. I was reading this article and mounted the share with forcedirectio option (the server I am connecting to has a around 400 MB/s of network output). The file errors disappeared but now it shows this:

zip warning: unexpected signature on disk 0 at 1773216
 
Old 08-26-2011, 05:37 PM   #7
metalhead201
LQ Newbie
 
Registered: Aug 2011
Location: San Francisco
Distribution: Kubuntu, CentOS
Posts: 11

Rep: Reputation: Disabled
OK cool. That looks like just a warning.

Yeah, I think it was a hardware/mounting issue and not a software issue. Sorry I wasn't any help.
 
  


Reply

Tags
mount, redhat, zip


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zip disk corrupted - Linux utility/driver to recover? Optiker Linux - General 10 04-04-2011 04:39 PM
ZIP files down load corrupted =( thorgan Linux - Software 2 04-29-2007 03:18 AM
create a self-extracting zip file with zip on solaris? samsolaris Solaris / OpenSolaris 3 10-15-2004 01:50 AM
e0 will Rx, but not Tx...e1 works fine giant Linux - Networking 2 09-15-2004 01:13 PM
Works just fine...I think /home/kyle Linux - Software 0 03-10-2004 05:09 AM


All times are GMT -5. The time now is 03:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration