Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CHKDSK /R incorrectly reports a bad cluster in large, compressed files on NTFS volume

23 views
Skip to first unread message

Ben Voris (remove 'N' 'O' and 'SPAM' to reply)

unread,
Jul 15, 2004, 9:07:48 PM7/15/04
to
The /R option of CHKDSK appears to have a problem when scanning a large,
compressed file on a NTFS volume.

CHKDSK says, "/R Locates bad sectors and recovers readable information."
With this option, after CHKDSK gets checks metadata (directories, etc.), it
scans the contents of each file, theoretically verifying only that the data
can be read (I guess by verifying some sort of low-level checksum). After
it scans all files, it then scans the free space.

Unfortunately, when scanning a large, compressed file on a NTFS volume,
CHKDSK *always* reports one error in the file, even when the file is fine.
(I don't know how it behaves if there really is a problem.) I've seen this
on a WDC USB external drive, a WDC internal IDE drive, and a IBM internal
IDE drive. Here's what it looks like:

...snip...
CHKDSK is verifying file data (stage 4 of 5)...
Windows replaced bad clusters in file <some number>
of name \<file-name>.

And yet, the file isn't bad at all. I've filled multiple files with a test
pattern (ascending numbers) and successfully retried the data from each
file, and yet CHKDSK prints the above diagnostic once for each file. Even
after running CHKDSK /R three times, the error occurs once per large
compressed file.

As a final test, I used the "Extended Test" in WDC's DLGDIAG for Windows
tool, which claims the three drives are fine.

And, if I uncompress the file, CHKDSK /R reports no error. (New clusters
are allocated for the uncompressed file, but CHKDSK doesn't report a problem
in free space either.)

I've seen files between 8 and 20 GB trigger this problem, but I haven't
tested exhaustively.

Is this a known problem that I've somehow missed? Have others seen it? If
anyone is interested in testing for themselves, I have a simple C++ program
that will write a test pattern and read it back. It's available in both
source and binary by emailing me.

(Since my original post in microsoft.public.windowsxp.general, I've
discovered that files as small as 4 GB show this problem, but that 3 GB
files do not. And the program I wrote really is trivial; I wrote it only to
convince myself that CHKDSK is lying.)

0 new messages