Windows – defrag /x – consolidate free space not really working – Windows Server 2012

defragmentationhard drivewindows

I am trying to shrink my 300GB partition. There is just 50GB used. So I ran defrag c: /x which should consolidate free space ("Free-space consolidation is useful if you need to shrink a volume, and it can reduce fragmentation of future files.")

After running the defrag command the result was:

Volume Information:
        Volume size                 = 297.57 GB
        Free space                  = 248.53 GB
        Total fragmented space      = 1%
        Largest free space size     = 132.19 GB

Why didn't it create a much larger block of free space? After running the command I was able to shrink the partition to only 170GB despite only 50GB actually being used. Do you suggest some other software utility which can do this better then MS defrag?

Best Answer

I've tried many tools, starting with defrag C: /X (which tries, but doesn't give good results) and found out these steps give the best results:

  1. Perform an Ultradefrag full optimisation
  2. Perform a MyDefrag Consolidate free space script on the drive.

Note that MyDefrag (formerly named JkDefrag) is not maintained any more but the 4.3.1 version in the WayBack machine still works very well as the underlying defragmentation APIs in Windows haven't changed.

References: