Wednesday, November 23, 2011

Shrink a Windows 7 Volume below Half

OK, time out from sailing for some tech talk. I could not find this solution anywhere so I thought I would post something telling how to shrink a volume in Windows 7. There are lots of answers out there that all involve spending money on 3rd party tools. But there is a fairly simple way to do it.

The issue is that Windows/NTFS stores an MFT file halfway along the drive which is an unmovable system file, which means not matter how little data you have on a drive you can't shrink past just over halfway since that file is started just past the halfway point on the volume.

This came up when I tried to restore a backup that used only 300GB of space or so onto a 640GB volume. You'd think that would work right? Well unfortunately Microsoft in all its brilliance decided that since the original backup came from a 1280GB volume, it couldn't be done. This will give an error about 'no suitable disk for restore found'.

The answer is to shrink the volume and then perform another backup with the smaller volume size which will then fit onto a smaller drive. Follow these basic steps to do that.

1. Defragment the drive. Always required. You can try using the windows utilities which should do the job. There is also a free alternative which actually uses a microsoft utility that will do a very thorough job as well. Power Defragmenter.
2. You may need to also move some system files around. You can follow steps from here. - working-around-windows-vistas-shrink-volume-inadequacy-problems
3. Create a system repair disk. Control Panel->Backup and Restore->Create a System Repair Disk.
4. Boot using that disk.
5. When it starts, cancel the restore process, and start a Windows Command Prompt.
6. Run diskpart
      list volumes
      select volume 2 # Choose the volume that corresponds to the drive you are trying to shrink.
      shrink querymax # This will tell you how much it can shrink
      shrink # Defaults to shrinking to the maximum amount.

That should be it. If you still can't shrink the disk, try doing it in Windows using Computer Management->Disk Manager. When it fails there, it will log an error in the event log telling you which file is involved, and you should be able to move that using one of the steps in step 2 above.

OK, back to sailing. Or maybe riding my bike.


Anonymous said...

You said "without using 3rd party tool" but step 2 USE 3rd party tool.
So basically you are wrong.

T Schmidt said...

I actually said "involve spending money on 3rd party tools". Power Defragmenter is free.

Ram A said...

Tod - Could you please provide more detail on Step #5 - How do I get to the command prompt after I boot using the system repair disc? Thanks in advance.

Regards, Ram.