LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-06-2006, 12:01 PM   #1
googs
LQ Newbie
 
Registered: Sep 2006
Location: New England
Distribution: RedHat
Posts: 2

Rep: Reputation: 0
cp command failing for large files - Input/Output error


I am having trouble copying large files between Linux boxes. At home I have two Linux boxes, boxA and boxB. Both are running RedHat 8, and have been no problem for years.

boxA has a directory on boxB automounted. For working with most files it's fine. But for large files, when I do a cp from a native directory on boxA to the mounted filesystem, I get input/output errors. To wit:

(where zzz is the very large file and xxx/yyy is the mounted directory)

cp zzz xxx/yyy
cp: writing 'xxx/yyy/zzz': Input/output error

There is not a hard threshold where copy commands fail. I have successfully copied a 43MB file, but have choked on a 35MB and a 138MB file. There is no other activity on either system. Given that, I have not been able to quantify the threshold or conditions that cause the cp command to barf.

I have played around with the automount timeout variable. Changing it has made little difference. It's currently set for two hours. There's nothing conclusive here that makes me believe it's an automount error.

Both the source and destination directories reside on disks with lots (40G+) of free space. The filesystems are nowhere near full.

One interesting thing is that both of these directories are also mounted on a Win2k box via Samba. I am able to do a drag and drop copy. It takes several minutes, but it succeeds.

I have done a search of the forums here and came up with several threads that might be related. None have a definite resolution attached. I'm wondering if they're all due to the same cause:

Threads:

54237
31876
25896
355338


Does LQ have any suggestions on ways I might be able to do this cp? This problem originally showed up in a simple backup script I wrote, but reproduces rather easily from the command line. I'd rather not have to resort to using windows, as I'm attempting to backup some directories. Once I can successfully copy all files via `cp` I plan on incorporating the fix back into my script.

TIA,

- Joe
 
Old 09-07-2006, 10:29 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,116
Blog Entries: 9

Rep: Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628
Hi,

And welcome to LQ!

Have a look at dmesg output on both boxes, and maybe /var/log/[messages|debug|syslog]
It may be a problem with the network card on one of them.


Cheers,
Tink
 
Old 09-08-2006, 11:09 PM   #3
googs
LQ Newbie
 
Registered: Sep 2006
Location: New England
Distribution: RedHat
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks. No obvious problems in dmesg. I saw in the messages logfile that it was having trouble mounting a non-existant directory. It looked like some cruft from back when I was trying to get automount to work. I'll see if I can trace it down and clean it up, but it seems incidental and not related.

I'm leaning against it being a network problem simply because I can do things with the file, like view it using `less` or doing the copy via the W2K box from one to the other.

But in any case I'm still poking around to hopefully find the problem.

- Joe
 
Old 09-09-2006, 12:48 AM   #4
fudam
Member
 
Registered: Feb 2006
Distribution: FC
Posts: 86

Rep: Reputation: 15
Maybe try rsync instead? Whenever I have to move files between systems I use either rsync or scp.

I don't know if rsync resides on RH8 but if it does you can try using it. If you have sshd (as most system do) running you can tunnel that way without worrying about an rsync daemon. Try something like:
Code:
rsync -avz -i "ssh -l box_b_username"  zzz box_b_username@box_b:/xxx/yyy/
 
  


Reply

Tags
cp, error, files, inputoutput


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
aplay: pcm_write:1029: write error: Input/output error mimithebrain Linux - Software 2 12-04-2007 12:51 PM
Gentoo X server freezes /var/lib/init.d/ files input output error bendeg Linux - Software 0 12-01-2005 06:01 AM
"Input/output error" on files at end of CD mfeat Linux - Software 2 11-23-2005 03:01 PM
how to use the output of a file for input of a command sneak Linux - General 2 05-12-2004 10:21 AM
Input/Output errors on files Poetics Slackware 4 08-25-2003 06:57 PM


All times are GMT -5. The time now is 03:02 PM.

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
Open Source Consulting | Domain Registration