On Microsoft Windows Sever 2008 SP2, Windows 7, and Windows Server 2008 R2, you may not be able to shrink a volume more than half the original size


When trying to use diskpart to shrink a volume, you may not be able to shrink the volume size more than half the original value size.  If the volume is 300GB, then you may only be able to shrink it to 150GB. 


This is generally caused by a hidden or un-moveable file.  An event should be logged in the event viewer under the application log that gives the details of the file that caused the problem.  Here is an example of one of these logs:

Note: These events are only logged in Windows Server 2008 R2 and Windows 7.  You will not see them on Server 2008 SP2.

Log Name:      Application
Source:        Microsoft-Windows-Defrag
Date:          MM/DD/YYYY HH:MM:SS PM
Event ID:      259
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      test
A volume shrink analysis was initiated on volume (D:). This event log entry details information about the last unmovable file that could limit the maximum number of reclaimable bytes.
 Diagnostic details:
 - The last unmovable file appears to be: \$BitMap::$DATA
 - The last cluster of the file is: 0xbffda
 - Shrink potential target (LCN address): 0x3e0a
 - The NTFS file flags are: -S--D
 - Shrink phase: <analysis>


There is no way to shrink the volume any further using Microsoft Technologies.  Here are the two best ways to prevent and work around this problem:

1. Move all the data from the drive, delete the volume on the drive, and create a new smaller volume

2. Create a smaller volume to start with and then grow the volume as needed.

More Information

There are third party tools available that may work through this issue, however, they are not supported by Microsoft.