NTFS Directory Corruption with Frequent File CreationLast reviewed: January 6, 1998Article ID: Q169404 |
The information in this article applies to:
SYMPTOMSA directory in which files are repeatedly created and deleted eventually becomes corrupt. Subsequent attempts to access files in the directory or to create or delete files in the directory yield pop-up window indicating that the directory is corrupt and instructing the user to run CHKDSK. When CHKDSK is run, it generates output like the following (although the specific file record segments affected will vary):
Deleting corrupt attribute record (16, "") from file record segment 286. Deleting corrupt attribute record (32, "") from file record segment 286. Deleting corrupt attribute record (48, "") from file record segment 286. Deleting corrupt attribute record (80, "") from file record segment 286. Deleting corrupt attribute record (144, $I30) from file record segment 286. Deleting corrupt file record segment 286. Deleting orphan file record segment 8628. Deleting index entry DirectoryName in index $I30 of file 244. CHKDSK is recovering lost files. CAUSEMultiple attributes associated with a given file have the same attribute instance tag value. This is only likely to happen in directories where many files are repeatedly added and deleted in an "unbalanced" way.
RESOLUTIONTo resolve this problem, you can do one of the following:
STATUSMicrosoft has confirmed this to be a problem in Windows NT version 3.51. A supported fix is now available, but has not been fully regression tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information. Microsoft has confirmed this to be a problem in Windows NT version 4.0. A supported fix is now available, but has not been fully regression tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.
MORE INFORMATIONAttribute entries within an NTFS File Record Segment (FRS) are labeled with an "instance tag" that must be unique for the attributes in a given FRS. The value for an attribute instance tag is generated when an attribute is created. Thus, typical instance tag values range from 0 to about 10 on most files. If an attribute is deleted and recreated, it receives a new instance tag. Each time a new instance tag is needed, NTFS increments a counter associated with the FRS in question and uses the next previously unused value. Thus, instance tags can grow without bound if attributes are repeatedly destroyed and recreated. For the vast majority of files and directories, the scheme described above does not result in any problems because, once created, FRS attributes tend not to be deleted and recreated. There is one scenario that is known to be an exception. If many files are repeatedly added to a directory and then deleted from the directory in such a way that the "binary tree" that indexes the directory becomes unbalanced, the "index root" attribute for the directory is repeatedly destroyed and re-created. Because instance tags are only 16 bits in size, this means that instance tags can be duplicated after a directory index has been rebalanced 65,535 times. Note that even if instance tags are duplicated, the directory will not be considered corrupt unless, at some point, it contained a sufficiently large enough number of files. Therefore this problem may be difficult to reproduce except in directories containing large numbers of files.
|
Additional query words: chkdisk autochk autocheck
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |