How to locate and correct disk space problems on NTFS volumes
For a Microsoft Windows 2000 version of this article, see
the following Knowledge Base article: 303079 (http://support.microsoft.com/kb/303079/EN-US/) How to Locate and Correct Disk Space Problems on NTFS Volumes
On This PageSUMMARYThis article
discusses how to check an NTFS file system's disk space allocation to discover
offending files and folders or look for volume corruption in Windows Server
2003-based computers. NTFS supports many volume and file-level features that may lead to what appear to be lost or incorrectly reported free disk space. For example, an NTFS volume may suddenly appear to become very full for no reason, and an administrator cannot find the cause or locate the offending folders and files. This may occur if malicious or unauthorized access to an NTFS volume where very large files or a high quantity of small files are secretly copied has occurred. These files then have their NTFS permissions removed or restricted. This behavior may also occur after a computer malfunction or power outage occurs that cause volume corruption. The disk space allocation of an NTFS volume may appear to be misreported for any of the following reasons:
MORE INFORMATIONThe following information can help you to optimize, repair,
or gain a better understanding of how your NTFS volumes use disk space. Cluster Size Is Too LargeOnly files and folders that include internal NTFS metafiles like the Master File Table (MFT), folder indexes, and others can consume disk space. These files and folders consume all the file space allocation by using multiples of a cluster. A cluster is a collection of contiguous sectors. The cluster size is determined by the partition size when the volume is formatted. For additional information about clusters, click the following article number to view the article in the Microsoft Knowledge Base:140365 (http://support.microsoft.com/kb/140365/EN-US/)
Default Cluster Size for FAT and
NTFS
When a file is created, it consumes a minimum of a
single cluster of disk space, depending on the initial file size. When data is
later added to a file, NTFS increases the file's allocation in multiples of the
cluster size.To determine the current cluster size and volume statistics, run a read-only chkdsk command from a command prompt. To do so, follow these steps :
You can only change the cluster size you are using by reformatting the volume. To do this, back up the volume, and then format the volume by using the format command and the /a switch to specify the appropriate allocation. For example: format D: /a:2048 (This example uses a 2-KB cluster size).Note: Alternately, you can enable NTFS compression to regain space that you lost because of an incorrect cluster size. However, this may result in decreased performance. File Attributes or NTFS PermissionsBoth Windows Explorer and the directory list command dir /a /s display the total file and folder statistics for only those files and folders that you have permissions to access. By default, Files hidden files and protected operating system files are excluded. This behavior may cause Windows Explorer or the dir command to display inaccurate file and folder totals and size statistics.To include these types of files in the overall statistics, change Folder Options. To do so, follow these steps :
To determine the folders and files that you cannot access, follow these steps:
After you locate the files that you do not have access to, you can add or change permissions by using the Security tab while you view the properties of the file or folder in Windows Explorer. By default, you cannot access the System Volume Information folder. You must add the correct permissions to include the folder in the dir /a /s command. Note: You may notice folders or files that do not have a Security tab. Or, you may not be able to re-assign permissions to the affected folders and files. You may receive the following error message when you try to access them: D:\folder_name\ is not accessible Access is denied http://support.microsoft.com/default.aspx?scid=/directory/question.asp&SD=GN&FR=0 (http://support.microsoft.com/default.aspx?scid=/directory/question.asp&sd=gn&fr=0) Invalid File NamesFolders or files that contain invalid or reserved file names may also be excluded from file and folder statistics. Folders or files that contain leading or trailing spaces are valid in NTFS, but they are not valid from a Win32 subsystem point of view. Therefore, neither Windows Explorer nor a command prompt can reliably work with them.For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 120716 (http://support.microsoft.com/kb/120716/EN-US/)
How to Remove Files with Reserved Names in Windows NT
You may not be able to rename or delete these files or folders. When you try to do so, you may receive one of the following error messages: Error renaming file or
folder -or-Cannot rename file: Cannot read from the source file or disk. Error deleting file or folder
If you have folders or files that you cannot delete or rename,
contact Microsoft Product Support Services. To do so, visit the following
Microsoft Web site: Cannot delete file: Cannot read from the source file or disk. http://support.microsoft.com/directory/question.asp (http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fdirectory%2fquestion.asp) NTFS Master File Table (MFT) ExpansionWhen an NTFS volume is created and formatted, NTFS metafiles are created. One of these metafiles is named the Master File Table (MFT). It is very small when it is created (approximately 16 KB), but it grows as files and folders are created on the volume. When a file is created, it is entered in the MFT as a File Record Segment (FRS). The FRS is always 1024 bytes (1 KB). As files are added to the volume, the MFT grows. However, when files are deleted, the associated FRSs are marked as free for reuse, but the total FRSs and associated MFT allocation remains. That is why you do not regain the space used by the MFT after you delete a large number of files, .To see exactly how large the MFT is, you can use the built-in defragmenter to analyze the volume. The resulting report provides detailed information about the size and number of fragments in the MFT. For example: However, for more complete information about how much space (overhead)
the whole NTFS is using, run the chkdsk.exe command, and then view the output for the following line: Currently, only third-party defragmenters consolidate unused MFT FRS
records and reclaim unused MFT allocated space. Alternate Data StreamsNTFS permits files and folders to contain alternate data streams. With this feature, you can associate multiple data allocations with a single file or folder. The use of alternate data streams on files and folders has the following limitations:
NTFS File System CorruptionIn very rare circumstances, the NTFS Metafiles $MFT or $BITMAP may become corrupted and result in lost disk space. You can identify and fix this issue by running the chkdsk /f command against the volume. Toward the end of chkdsk, you receive the following message if you must adjust the $BITMAP:Other NTFS Features That May Cause File Allocation ConfusionNTFS also supports hard links and reparse points that permit you to create volume mount points and directory junctions. These additional NTFS features may cause confusion when you try to determine how much space a physical volume is consuming.A hard link is a directory entry for a file regardless of where the file data is located on that volume. Every file has at least one hard link. On NTFS volumes, each file can have multiple hard links, and therefore a single file can appear in many folders (or even in the same folder with different names). Because all the links refer to the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all the links to it are deleted. After you create a hard link, programs can use it like any other file name. Note: Windows Explorer and a command prompt show all linked files as being the same size, even though they all share the same data and do not actually use that amount of disk space. Volume mount points and directory junctions permit an empty folder on an NTFS volume to point to the root or subfolder on another volume. Windows Explorer and a dir /s command follow the reparse point, count any files and folders on the destination volume, and then include them in the host volume's statistics. This may mislead you to believe that more space is being used on the host volume than what is actually being used. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 205524 (http://support.microsoft.com/kb/205524/EN-US/)
How to Create and Manipulate NTFS Junction Points
In summary, you can use chkdsk output, NTBackup GUI or backup logs, and the viewing of disk quotas to determine how disk space is being used on a volume. However, Windows Explorer and the dir command have some limitations and drawbacks when used for this purpose. APPLIES TO
| Article Translations
|

Back to the top
