Discussion Locked

Master File Table in NT

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Recently I ran Executive Software's Diskeeper 4.0 on an PIII workstation. When I ran the analyzer it flaged me with a prompt stating that the application was unable to defrag the drive properly due to the 20% disk space limitation. After examinig the chart further I noticed that the MFT Space has nearly doubled in size. I later discovered that this MFT space was reserved for NTFS to record file locations,size, and other information. Also the data within this space could be deleted but the MFT table would not reduce in size.
My question is:
How can the MFT table be reduced and original diskspace be restored?

5 replies

by otto3

You've just discovered one of the feature/bug with NT's MFT with NTFS. As you noticed, it grows but does not shrink dynamically. Each created file results in a 2KB entry added to it. The MFT does delete the entry if you delete the file to free up the space, however, it doesn't have the capability to decrease the actual size of the MFT. There's an exploit for this, a script creating zillions of 0 byte files, which can crash NT.
The only way to reduce the size of the MFT is to re-install NT.

Otto

by greg hayes/raxco software

On NTFS partitions, freespace is actually located in 2 different areas - INSIDE of the MFT Reserved Zone and OUTSIDE of the MFT Reserved Zone. The Microsoft defrag api's prohibit disk defraggers from using the freespace INSIDE of the MFT Reserved Zone. On NT 4, the Reserved Zone is a fixed size. On Win2k, it is dynamically allocated on partition mount. This means that even you you appear to have (for example) 1gb free, 500mb of this might be INSIDE of the MFT Reserved Zone and unusable by defraggers - leaving you only 500mb of freespace for a defragger to work with.

The MFT will do nothing except for grow and grow. Every file that gets created has a file id # - which is a 64bit number. About 2/3's of this number is the actual file id and the remainder is a sequence number that gets incremented. When a file gets deleted, the file id is retained, but marked "not in use". This file id won't get re-used until a really really large number of files get created - at which time it will roll back around and start incrementing the sequence number. Unfortunately, there is no easy way to reduce the size of the Master File Table itself - aside from doing a backup, re-format, and restore - which is a temporary solution at best because as soon as you start createing files, the MFT will start to grow again.

- Greg/Raxco Software

Disclaimer: I work for Raxco Software, the maker of PerfectDisk 2000 - which is a competitor of Diskeeper's, as a systems engineer in the supportdepartment.

This discussion is closed to new replies.