1

I would like to move all the data on a drive in Windows Server 2003 to the beginning of the drive (a virtual hard drive) so that I can more fully compact the .vhd file. However, the Windows server 2003 built in defrag tool only defrags the files, leaving large gaps of freespace (on the order of Gigabytes) that prevent me from compacting the file.

Is there any way to consolidate the data at the beginning of the drive in Windows Server 2003?

Edit: Under Hyper-V, it is no longer necessary to defragment and precompact the .vhd. Simply run the Hyper-V compacter and it takes care of everything. Accepting the answer below because it does help consolidate free space.

Nathan
  • 276
  • 1
  • 5
  • 13

1 Answers1

1

Numerous free defrag utilities have this ability but my current favourite is Defraggler:

http://www.piriform.com/defraggler

The feature you want to use is 'Defrag Free Space'.

Chris Thorpe
  • 9,903
  • 22
  • 32
  • That helped some, however, it left a gap of several gigs, then a single 4 KB block. Arg. Also, when I use the "Analyze" portion of the build in Windows defragmenter, it shows a larger portion of free space that defraggler says is filled. Defraggler also won't let me re-run the "Defrag free space" option. – Nathan Nov 30 '09 at 21:36