LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   errors while copying/moving files (https://www.linuxquestions.org/questions/linux-general-1/errors-while-copying-moving-files-63589/)

plisken 06-04-2003 05:51 AM

errors while copying/moving files
 
I seem to get a lot of errors when copying or moving large amounts of data, ie complete websites etc.

The error is as follows:
cp: reading 'foldername/filename.jpg': Input/output error

This would not seem to be a permissions issue.

I also notice that during copying or moving folders of this size, which can sometimes take a couple of hours, the system is VERY slow to resond, even when not running X, this is of great concern to me...

Don't really want to start comparing to Win2K again, but I have no such problems when doing such tasks on that machine, which is similarly equiped.

Any ideas?

plisken 06-04-2003 05:55 AM

More information
 
If the error points to a file which is actually an image, then when viewing the image, it is corrupt at both the source and destination, most normally with half the image being visable.

Hope this helps...

trickykid 06-04-2003 08:41 AM

What size are we speaking of? Megabytes or Gigabytes.. etc, you never specified that. And are you moving just from one folder to another on the same drive, or over a network share, etc? Are you using just the cp command or any other command?

plisken 06-04-2003 04:49 PM

Movinf rom one folder to another on the same drive, either using cp -fr or when moving/copying in gnome.

The errors occur on file of varying size.

Also what I have noticed is that if I move say a folder which is 500Mb in size, it takes a seriously long time for the action to be completed.

acid_kewpie 06-04-2003 04:51 PM

ok, have you got dma working (man hdparm) and what are the file systems you're using here?

plisken 06-04-2003 06:46 PM

The following is the output from /sbin/hdparm -v /dev/hda6

/dev/hda6:
multcount = 0 (off)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 7473/255/63, sectors = 117900972, start = 2152773

Not sure how to check which filesystem I'm using:(

plisken 06-04-2003 06:53 PM

When I run the mount command, I get the following:

/dev/hda6 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/hda1 on /boot type ext2 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)

I'm assuming this means the ext2 filesystem...

All help appreciated...

emetib 06-04-2003 07:10 PM

ext2 is very bad in terms of read/write performance compaired to any of the journaling filesystems. so yes it will take a while.

the error, i would cp -a whatever

hdparm -d1 /dev/hda

cheers.

plisken 06-04-2003 07:42 PM

After running hdparm -d1 /dev/hda and then running hdparm -t /dev/hda there is a vast improvement, however when rebooting, the dma setting defaults back to 0, is there anyway of preventing this, or would it be better/easier to have it set to 1 at boot time?

If ext is that bad, which filesystem should I be using for performance, and how can I change it, if possible?

emetib 06-04-2003 08:23 PM

i believe that the option that you want is -k, check the man pages to be sure. man hdparm.

it all depends on what you are doing on your computer. if you just have a workstation and are backing up your files, then i would use the reisersfs. if you are server then use ext3. do a google for journaling file systems. that should give you enough info on it for a long research attempt.

i use reisers on my system. i like that speed and the stability that it has. yet at the end of the month i will be switching and reinstalling everything.

to switch, you will have to reinstall by what i know. i believe that you can add journaling to an existing ext2, but i'm not positive. check google on that one or open another thread. you should get some responces to the thread.

cheers.

plisken 06-05-2003 06:14 AM

Tried the -k option but after reboot, things reverted back to the origional settings.

What I done was in /etc/sysconfig there is a file called harddisks, I simply added USE_DMA=1 to this file.

What happens is during boot up, the /etc/rc.sysinit checks this file and sets the hdparam parameters accordingly...

After a few reboots, I checked things out by using hdparm -v /dev/hda and now find that DMA is on.

I run hdparm -Tt /dev/hda with and without DMA being activated, the results are below:

DMA:0

Timing buffer-cache reads: 128 MB in 0.90 seconds =142.22 MB/sec
Timing buffered disk reads: 64 MB in 21.30 seconds = 3.00 MB/sec

DMA:1

Timing buffer-cache reads: 128 MB in 0.84 seconds =152.38 MB/sec
Timing buffered disk reads: 64 MB in 2.30 seconds = 27.83 MB/sec

There does seem to be a slight improvement in performace, especially when opening images etc, but I'll have to continue testing to see if this prevents the errors that I have been seeing while moving/copying files.

thanks...

plisken 06-07-2003 05:19 AM

I have reverted back to having DMA off, as I was notacing many kernel error messages.

Any ideas?

Muddy 06-07-2003 05:28 AM

If your using RH 6.2 that could use some updating... at least the kernel if not the whole distro. There have been many improvements made that would prob benefit you and possibly cure this problem. I don't have enough experience with hdparm other than what your already doing, however I do know a change in file system (ReiserFS) would help. However I don't know if you could change to that without waxing your data.

plisken 06-07-2003 05:40 AM

It is actually RH7 that is giving me these problems, but I presume that it could also do with an update or 2.

I may try a different filesystem, possibly a clean install, and if funds allow, then an additional HD would also be nice.

I don't actually recall an option during installation, to choose filesystem, must be there somewhere though...

Cheers.

Muddy 06-07-2003 05:57 AM

There for sure is, when you go into the partitioning part of it and your setting up swap, /boot etc.. you choose it there.


All times are GMT -5. The time now is 12:02 AM.