Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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'.

share|improve this answer
    
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

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.