NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Corrupting Files

On Mon, Dec 22, 2008 at 08:02:20PM +0900, Jorgen Lundman wrote:
> [...]
> If it is a disk issue, 8-skip-4-then-4 byte change would mean 2 
> consecutive calls to write() and seek(). I thought then perhaps it is 
> more likely to be in-memory cache corrupting, but why would they be 
> flushed out so much later? Or can it be possible that the file "on disk" 
> is good, but the read-cache, in-core, of the file is bad. (So, if I were 
> to umount/mount, the file would be good again.. maybe I will try that too).

It is possible, yes. You can try to get the file out of the cache
(maybe waiting long enough will do, or run something that reads a lot
from disk to fill the buffer cache), and see if the file is still
corrupted after re-reading from disk.
You can also use dump/restore to read directly from disk.

But I've also seen hard disk silently corrupting files (you write something,
read it later and you don't get what you did write). I'm almost sure it
was the disk because remplacing the disk with another one from the same
batch solved the problem.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index