When you use the Disk Management console to shrink the volume in which the Operation System is installed, you’re unable to choose a value (to shrink) beyond a limit. In the shrink volume dialog, the following message is displayed:
When you look at the Application event log, Event ID: 259 “defrag” event showed this:
A volume shrink analysis was initiated on volume OS (C:). 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: \pagefile.sys::$DATA - The last cluster of the file is: 0x749141f - Shrink potential target (LCN address): 0x9b6c2f - The NTFS file flags are: P---D - Shrink phase: To find more details about this file please use the "fsutil volume querycluster \\?\Volume{2eeff2ba-3c96-4389-a407-6461354e612a} 0x749141f" command.
It’s usually the pagefile.sys that prevents Disk Management from shrinking the volume beyond a point, as pagefile.sys is an unmovable file. Other unmovable files include hiberfil.sys hibernation file.
Also, the System Volume Information folder used by the System Restore feature prevents you from shrinking the drive beyond a point. In some systems, you’ll see this in the event log — “defrag” Event ID 259:
or
If the event log notifies you about the $BitMap::$DATA as the last unmovable file, you may try running Contig (from Microsoft SysInternals) first before partitioning the volume using Disk Management. Alternately, you can use third-party software (e.g., AOMEI Partition Assistant Free) to partition the system drive to overcome the limitation of Microsoft technology.
This article tells you how to shrink your system partition to your preferred size.
[Fix] “You cannot shrink a volume beyond the point” when Shrinking a Partition
My Dell Vostro computer comes with a single partition. When I attempted to shrink the partition so that I can create a second partition out of the free or unallocated space, I could shrink the 940 GB drive only by 50% approximately. Here is the max possible shrink size the Disk Management dialog offered me:
The fix is to temporarily disable hibernation, the Paging file, as well as the System Restore feature. Once disabled these features, restart Windows and resize (shrink) the volume using Disk Management.
Disable System Restore
- Launch systempropertiesprotection.exe from the Run dialog
- Select the system drive and click Configure
- Click Disable system protection, click OK, OK.
This turns off System Restore and also erases all the restore points.
Disable the hibernation feature
- Open Command Prompt as administrator
- Run the following command:
powercfg /hibernate off
This turns off the hibernate feature and clears the hiberfil.sys from the system drive.
Disable the Paging file
- Launch systempropertiesadvanced.exe from the Run dialog.
- Under Performance, click Settings, click Advanced button
- Click the Change button.
- Uncheck Automatically manage paging file size for all drives
- Select No paging file, and click Set
- Click OK.
- You’ll see the following warning message after you click OK.
If you disable the paging file or set the initial size to less than 200 megabytes and a system error occurs, Windows might not record details that could help identify the problem. Do you want to continue?
Click Yes to continue.
- Restart Windows
- Open Disk Management and attempt to shrink the system volume. Now you should be able to shrink the drive to the required size as you want.
After disabling paging, hibernation and System Restore, I’m now able to shrink the drive by 95% as seen in the above screenshot. The remaining 5% disk space is consumed by the OS, your personal data and other overheads. I could successfully partition the C: drive, reducing its size to 150 GB which is what I wanted.
Re-enable System Restore, Paging file and Hibernate features
After you shrink the volume, be sure to re-enable the Paging file and System Restore and Hibernate options by reversing the earlier steps.
Enable System Restore
- Launch systempropertiesprotection.exe from the Run dialog
- Select the system drive and click Configure
- Click Turn on system protection, click OK, OK.
This turns on System Restore.
Enable Hibernation
- Open Command Prompt as administrator
- Run the following command:
powercfg /hibernate on
This turns on the hibernate feature. As a side note, Fast Startup depends upon the Hibernate feature to work.
Note: If you run the command from a normal (non-elevated) Command Prompt, you’ll see the error Unable to perform operation. An unexpected error (0x65b) has occurred: Function failed during execution when turning off/on hibernation.
Enable the Paging file
- Launch systempropertiesadvanced.exe from the Run dialog.
- Under Performance, click Settings, click Advanced button
- Click the Change button.
- Select the system drive, click System managed size, and click Set
- Enable Automatically manage paging file size for all drives
- Click OK.
- Restart Windows
I hope this article helped you shrink your system volume as required, without any limitation on your Windows computer.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
I get “An unexpected error has occurred : function failed during execution” when turning on the hibernation off through the command prompt . Help
Please
@Marcus: You need to run the command from an admin Command Prompt window.
Great article, worked like a charm for me.
However there are a few mistakes in the last section “Re-enable System Restore, Paging file and Hibernate features”, that could cause problems to inexperienced users.
For example, System Restore step 3 should be “Turn on system protection”, not “Disable system protection” (obvious to most, but you never know).
Also some of the steps under Enable the Paging file are not in correct order.
@Jay: Thanks for pointing out the mistakes. They’re now corrected.
Fantastic!. Worked like a charm. Thanks
Thank you. This guide is very useful. This is the only guide that covers everything about regaining shrinkable space.
Thank you again.
I only had to implement the removal/reenable of the swapfile setting to be able to shrink the disk space on the C drive I was shrinking. Thank you so much! Great step by step information!
Worked like a charm!
i didnt worked in my pc hp- 15 bs
It worked brother, thank you!
Thank you!!
It worked for too, thank you!
Whoever you are, where ever you are, God bless you!
nice tutorial brother
It worked for me. But sometimes you need to do the procedure a couple of times, until the page file step requires to restart the system. Thank you very much for your help!
I followed all the steps and now my system is not booting.
Need Help: I have problem with some sort of Windows Defender File
Diagnostic details:
– The last unmovable file appears to be: \ProgramData\Microsoft\Windows Defender\Scans\mpenginedb.db-wal::$DATA
– The last cluster of the file is: 0x314b5cc
@Kiran: Disable Windows Defender temporarily.
Then delete or rename
mpenginedb.db-wal
Restart Windows Defender.
I followed this guide until the restart. Then when I tried to shrink the volume it gave me less space I could shrink than before. Then I run the defrag again and waited for 8 passes to complete and show me 0% fragmentation and then suddenly I had lots of shrinkable space.
Thanks, this work very well.
My system get stuck on:
Diagnostic details:
– The last unmovable file appears to be: \System Volume Information\$CBT2::$DATA
What gets past that one?
Worked perfectly on my system. Thanks a lot
Its work for me.
Thank you
BIGGEST THANKS TO YOU MAN !!!!!
This very helpful and straightforward, thank you man.
God richly bless you sir. It did work