Some files are corrupted when copying a lot of files


When copying large number of files, some source files differ from target ones, size is the same, but cmp shows that files are different. The files are really damaged,


- Hardware: Celeron 400, 396 MB RAM, 512 MB swap two ATA disks, Fedora Core 4, kernel 2.6.16-1.

- Test example: 148 MB in 138 JPG files
Some files copies will be corrupted. I can re-copy them one by one without problems. I can copy a group of some 20-30 files without problems.

- problem appears even when copying within the same disk and the same partition

- problem appears with different file managers and shell

- problem appears for both vfat and ext3 partitions

- when booted the same computer with Windows XP, I can copy files on vfat patrtitions without any problems.

- no errors in /var/log/messages

- mounts look like

/dev/hda1 on / type ext3 (rw)
/dev/hdc2 on /mntpoint type vfat (rw,noexec,nosuid,nodev,uid=500,gid=500)

Many thanks in advance for your help!!!

dmesg |grep hd
    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:pio, hdd:pio
hda: SAMSUNG SP4002H, ATA DISK drive
hdb: CD-540E, ATAPI CD/DVD-ROM drive
hdc: Maxtor 6E040L0, ATA DISK drive
hda: max request size: 128KiB
hda: 78242976 sectors (40060 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33)
hda: cache flushes supported
 hda: hda1 hda2 hda3 hda4 < hda5 >
hdc: max request size: 128KiB
hdc: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(33)
hdc: cache flushes supported
 hdc: hdc1 hdc2 hdc3
hdb: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33)
hdd: ATAPI 63X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
SELinux: initialized (dev hda1, type ext3), uses xattr
EXT3 FS on hda1, internal journal
SELinux: initialized (dev hda3, type vfat), uses genfs_contexts
SELinux: initialized (dev hdc2, type vfat), uses genfs_contexts
SELinux: initialized (dev hdc3, type vfat), uses genfs_contexts
SELinux: initialized (dev hda5, type vfat), uses genfs_contexts
Adding 522104k swap on /dev/hda2.  Priority:-1 extents:1 across:522104k
SELinux: initialized (dev hdd, type udf), uses genfs_contexts
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Assuming that you copy TO FAT partition, try adding "sync" and "dirsync" to mount options for /dev/hdc2.
does the problem appear both when you copy from hda to hda  and when you copy from hdc to hdc?

did you try booting with ide=nodma kernel option and see if the problem persists?
Actually, the more I think about it the more it looks like hardware problem - I'd check memory, CMOS IDE/UDMA settings, IDE controller and IDE wires going to disks, in that order. Also, check the current settings using hdparm and see if setting the drives to lower udma level takes care of it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

I agree with the hardware problem diagnosis.  You could start testing with memtest86.
dub082097Author Commented:
Thanks a lot for you feedback, it may take some days to check everything since this is my home PC, I'll come back.
dub082097Author Commented:
I run memtest86 and found several errors within one DIMM. Probably, I should remove it and then check again.

I also found that some options in BIOS are disabled, I'll try enabling them, especially the first one...

Memory Parity ECC Check
IDE prefetch Mode
IDE HDD Block Mode
UDMA for all IDE devices
You would only want to enable the 1st one if you do in fact have memory with parity.  (Unless it's a server setup, it's unlikely.)
dub082097Author Commented:

 Many thanks to slow1000 for memtest86. I found that one DIMM makes some errors and replaced it. However, the problem did not disappear until resetting BIOS to default values. Thanks to m1tk4 for the solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.