Important information for those who struggle to shrink the partition even taking all steps mentioned in the accepted answer.
It is possible to get the information what is the last unremovable file, which disturbs the shrinking process and delete it.
Look for the solution below.
Obviously, you can use 3rd party software, which I also tried to use, but most of the cases free versions will allow you only to shrink when running the system - for the bootable versions in most cases you need to pay.
Before you start, important things to remember:
- Don't treat your SSD drive with any of defragmentation tools, because you can damage it or make it live shorter.
- Before you start to play with partition tools, make a backup of important data.
BACKGROUND:
In my case under Windows 10 ran on SSD drive I performed all steps mentioned in this tutorial, which are:
- Disable pagefile.
- Disable hibernation.
- Disable system protection.
- Disable the kernel memory dump
- Restart the system.
It didn't work. I also performed partition optimization process, but it also didn't work. I keep getting the message:
You cannot shrink a volume beyond the point where any unmovable files are located
I've also tried MiniTool Partition Wizard Free
, however like mentioned above, I was unable to shrink while running the system. I've been asked to reboot, however the application froze. Fortunately, I was able to cancel the process without losing any data - system booted normally. One of the suggestions was to use bootable version, which is not free. So I dug more and found the solution.
SOLUTION:
It is possible to get the information what is the last unremovable file, which disturbs the shrinking process. Simply you need to run the Event Viewer.
- Start Menu > Run > eventvwr.msc
- In the left panel choose “Windows logs” > “Application”.
- Check last Defrag events details to see what is the possibly last unremovable file.
- Remove the file. If the file is somehow related to the system and protected, Google for a solution with the filename as a query.
- Perform partition shrinking attempt again.
If you succeed, remember to:
- Enable pagefile.
- Enable hibernation.
- Enable system protection.
- Enable the kernel memory dump
In my case, I need to look for last unremovable file 3 times and after each deletion, I was able to shrink the partition a little bit. Basically, you jump from the last unremovable file to another, until you reach the desired partition volume. It can take some time but still, you are able to do it without third-party apps.
I've found the solution there and sharing it here hope it will help more people.
Defragment everything! Boot a live OS and then defragment every single file and consolidate the whole drive to the beginning. What you want is no free space between files, so that everything is contained in one big block of data. – GiantTree – 2015-12-24T23:47:55.060
Disable hibernate, page file, system restore temporarily then defrag/compact C drive, then try shrink, if it is small enough, mirror the C partition, enable page, hibernate, system restore after you boot into the new drive. – Moab – 2015-12-25T00:11:35.567
If you want to further decrease the size run disk cleanup (cleanup up system files) and delete windows update files. Do this before defrag. – Moab – 2015-12-25T00:16:00.797
And a last one - Compress everything. Aside from it getting faster (or not), it saves about 30% throughout the whole disk. Do that before Defrag! – Aganju – 2015-12-25T02:31:03.480
In reply to previous comments, doing a disk cleanup every now and then is good practice, but will probably not help in this case. The disk usage is listed at
195 GB
which is already below the target SSD size of256 GB
. The real problem is that Windows won't allow shrinking the partition below488,941
, most likely because ofunmovable
files. – dxiv – 2015-12-25T02:38:11.8703
the shrink function of diskmgmt.msc is very bad. You should use a good partition editor like Partition Wizard or EaseUS Partition Master, they can shrink the partition to the minimum size
– phuclv – 2015-12-25T02:50:28.2001I'd really consider what needs to be on the drive before I do something like this. 195gb is cutting it a little close, and most people end up having a ton of junk on their systems. Spring clean first! – Journeyman Geek – 2015-12-25T02:51:24.800
It remains to be addressed, possibly elsewhere, how much space would you leave for these files recreating after the shrink, I guess – matt – 2017-12-18T07:07:07.133
If you performed all steps in the accepted answer, which are correct, but still getting the message
– mpro – 2018-05-23T14:18:24.303You cannot shrink a volume beyond the point where any unmovable files are located
, check my answer posted below2Whilst I get the appeal of not using third party solutions, I cannot help but think that sticking "gparted" onto a small USB stick, booting the computer from that and then using it to shrink the partition seems a hell of a lot quicker than faffing around disabling hibernation, pagefile and system protection, rebooting, shrinking, re-enabling them and then rebooting again. – Richard – 2018-05-23T14:57:04.880
Follow this https://www.disk-partition.com/articles/shrink-volume-with-unmovable-files-4348.html and use the program mentioned there. Save your time for better things.
– masterxilo – 2018-12-19T20:36:07.327While this question targets Windows 7, it may still be of help.
– Alex Che – 2018-12-20T10:14:59.207