Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A while ago, I nearly filled my hard drive, much more than the recommended maximum of 85% of capacity. I believe that NTFS started storing files in the space reserved for the Master File Table (MFT) and the MFT had to fragment elsewhere as it grew.
I have cleared off space on the hard drive, but the MFT apparently remains fragmented, and there's a lot of slow disk access for even very simple operations like opening a folder or small file. This is killing performance. I remember that Windows standard disk defragmenter doesn't defragment the MFT because the MFT is in use when the operating system is running. I'm running Vista Ultimate and its defragment utility has very little in the way of reporting, less than older versions.

I suspect that a solution might involve booting up from an optical disc with a basic OS ("Live CD") and running a defragment utility from that. Can anybody tell me what program to use, or how to defragment my MFT?

Thanks!

share|improve this question
1  
It is not free, but I know Disckeeper can handle this. –  Zoredache Jul 27 '11 at 23:37

4 Answers 4

You can use the Sysinternals tool Contig:

contig.exe c:\$mft
share|improve this answer

Auslogics Disk Defrag Pro will accomplish this for you. Whilst not a free program, you can download a free trial, and if you do decide to purchase the license is available for use on up to three PCs.

Ultradefrag is a free and powerful FOSS defragmentation tool for the Windows Platform. It can defragment any system files including registry hives and paging file. It includes MFT optimization, which processes the MFT only.

share|improve this answer
    
+1 Ultradefrag did miracles to me with a stubborn $MFT that even Contig (that got so many upvotes here) couldn't defeat –  BornToCode Apr 16 '13 at 14:52

Best tool by far was the old JKdefrag, now Mydefrag. Will defrag the MFT. Also, it's free.

http://www.mydefrag.com/index.html

edit

Windows Defrag API, used by MyDefrag, supports defragging the MFT.

Following are the system file, stream, and stream types supported by FSCTL_MOVE_FILE in "filename:streamname:$typename" format.

$MFT::$DATA $MFT::$ATTRIBUTE_LIST $MFT::$BITMAP

And MyDefrag's script documentation:

Inode   Filename    Description
0   $MFT    Master File Table - An index of every file.
1   $MFTMirr    A backup copy of the first 4 records of the MFT.
2   $LogFile    Transactional logging file.
3   $Volume Serial number, creation time, dirty flag.
4   $AttrDef    Attribute definitions.
6   $Bitmap Contains volume's cluster map (in-use vs. free).
7   $Boot   Boot record of the volume.
8   $BadClus    Lists bad clusters on the volume.
9   $Quota  [Windows NT only] Quota information.
9   $Secure Security descriptors used by the volume.
10  $UpCase Table of uppercase characters used for collating.
11  $Extend A directory for: $ObjId, $Quota, $Reparse, $UsnJrnl.
$Extend\$ObjId  Unique Ids given to every file.
$Extend\$Quota  Quota information.
$Extend\$Reparse    Reparse point information.
$Extend\$UsnJrnl    USN Journal.
$Extend\$RmMetadata Transactional data.

While it won't run on a Live CD, it will run on Bart PE or the Ultimate Windows BootCD.

But neither is necessary to defrag the MFT.

share|improve this answer
    
Yep, this. I believe the defrag API was changed with Vista, so you don't even need to reboot. –  Hydaral Jul 28 '11 at 1:08
    
MyDefrag runs only on Windows; you can't run it from an open-source LiveCD. It claims to only remove files from the reserved MFT space, not to defragment the MFT if it's already fragmented. Is there another program [to be posted as a different answer] that can defragment the MFT? –  WBT Aug 27 '11 at 0:07
    
You are wrong. It's not explicit because the Defrag API supports defraging the MFT. Plus, you can check the MyDrag scripts. –  surfasb Aug 28 '11 at 15:23

These steps work for me:

  1. Run the MiniXP in Hiren's BootCD.
  2. Disable Hibernation, Virtual Memory and Kernel Memory Dump.
  3. Follow the instructions in this link (use the fsutil).
  4. Run MyDefrag at MiniXP with the option "Consolidate free space".
  5. Start Windows again and now you can shrink you partition respectfully.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.