28

I have a 900GB HDD, but for some reason it will only allow me to shrink like 2500MB of it. In the past, I could shrink to my desired size, but for some reason it is giving me a problem now. I have tried defragging it with PerfectDisk, but I actually think doing that made it even smaller. I have also tried using cmd diskpart but that fails too. Heres a pic:

Shrink C

Dave M
  • 13,138
  • 25
  • 36
  • 47
user204620
  • 381
  • 1
  • 3
  • 3
  • 2
    There's an explanation in the middle of the box in the link you pasted that tells you what causes this and what to do about it. – David Schwartz Mar 06 '13 at 10:39
  • You are attempting to shrink a volume with files that are unable to be moved. You will need to get rid of those files ( its likely a page file ) before you will be able to do this. – Ramhound Mar 06 '13 at 12:44
  • 1
    @Ramhound This can also be caused by 'unmovable' files, such as file system metadata. I believe the MFT mirror is created in the middle of the partition by default. The normal solution is to perform an offline resize using a tool that can move files and metadata, such as the Linux `parted` utility (often used with the `gparted` graphical interface). – Bob Mar 06 '13 at 13:11
  • @Bob - Based on the screenshot the user is unlikely using Linux/Unix since the application in question is a Windows application. As I went through some troubles with a HDD that started to fail, I discovered that the page file, was unable to be moved by the normal software I use to defrag my system. Of course when your HDD wants to attempt to place the page file in the one section of the disk with the problem it causes stability problems. – Ramhound Mar 06 '13 at 13:23
  • 1
    @Ramhound I am aware that they are using Windows. In my previous comment, I used a popular *nix-based tool *as an example*, though there are other methods. If desired, it is possible to use a Linux Live CD independent of the installed OS - [Parted Magic](http://partedmagic.com/doku.php) is designed specifically for this purpose. It's important to note, however, that resizing a partition in this manner can lead to a loss of data. – Bob Mar 06 '13 at 13:48
  • 8
    Possible duplicate of [How to shrink Windows 7 boot partition with unmovable files](http://superuser.com/questions/88131/how-to-shrink-windows-7-boot-partition-with-unmovable-files) – fixer1234 May 22 '16 at 18:26

7 Answers7

21

The main reason for not being able to shrink the disk are that there are unmovable files on the disk at the time of trying to shrink the volume (as your screenshot says).

The most common "unmoveable" files are files which are locked during normal computer operation such as virtual memory/pagefile/system restore files as well as a few other files which may be open, but not running "in memory"

Having come across this myself previously on both server and desktop operating systems - I can say the most likely culprit is the pagefile.

To fix this:

  1. Right-click Computer
  2. Select Properties
  3. Select Advanced system settings
  4. Select the Advanced tab and then the Performance radio button
  5. Select the Change box under Virtual memory
  6. Un-check Automatically manage paging file size for all drives
  7. Select No paging file, and click the Set button
  8. Select OK to allow and restart.

Here are the steps on Window 10: enter image description here

Once your machine has rebooted and you know you have no page file (check at the root of C: with hidden and system files showing) - try a defrag and then try shrinking the volume again.

Don't forget to reset your pagefile back to its original size afterwards! Failure to do so will potentially cause significant performance issues with any machine.

Hope this helps.

EDIT: I have just had to do this on another system which had other unmovable files. These turned out to be shadow copies of drives on a 2008R2 server. To remove these, use the following command in an elevated command prompt: Vssadmin delete shadows /For=:<driveletter> /all

MagTun
  • 1,378
  • 4
  • 23
  • 33
Fazer87
  • 12,520
  • 1
  • 36
  • 48
  • 1
    I've found that I had to disable hibernation as well to be able to shrink the volume as much as I wanted. The command for that is "powercfg.exe /hibernate off". – kotekzot Sep 14 '19 at 05:49
  • Would doing this operation while in safe mode be better as less services are running? – qroberts Dec 09 '20 at 19:09
  • @Fazer, I hope you don't mind, I added a printscreen for Windows 10 because it's a bit different – MagTun Apr 28 '21 at 07:22
  • yeah fine - if it helps people, great :) – Fazer87 Apr 30 '21 at 11:23
  • When I check these settings after doing the above, page file is still enabled. The 'No paging file' radio button is not checked. This happened after a reboot as well. – user2233706 May 24 '22 at 02:34
13

The answer here worked for me: How to shrink Windows 7 boot partition with unmovable files.

  1. Turn off Virtual Memory
  2. Turn off System Restore
    • Open Control Panel\System and Security\System
    • Click Advanced system settings on the left: enter image description here
    • Turn off System Restore for the drive you want to shrink: turn off System Restore:
  3. Restart
  4. Run your shrink
  5. Turn them back on again
soshial
  • 109
  • 4
Stewart
  • 425
  • 6
  • 16
  • 1
    Fazer's answer didn't work for me. Had to also disable and delete system restore as mentioned here – Mr Fox Oct 16 '18 at 14:20
  • 1
    Same for me. I had 582GB HDD with 90% free, yet I could only shrink 25GB initially. Disabling paging file didn't help. But disabling System Restore let me shrink up to 496GB! – wisbucky Dec 08 '18 at 08:47
  • 1
    Disabling of these 2 things helped me. Thank you a lot! Also, I added an image and updated the links in your answer, if you don't mind :) – soshial Dec 31 '20 at 15:58
  • For me disabling System Restore didn't change anything, but disabling swap helped a lot! Worth noting that newer Windows 10 changed the design of the "System" tab, the "Advanced System Settings" is now on the sidebar on the right side of the screen. – MrPowerGamerBR Feb 13 '21 at 15:04
  • This worked for me – Promise Preston Sep 16 '21 at 13:43
  • 1
    this actually reduced the available shrink size for me.. – Bassie Oct 25 '21 at 14:41
7

I know this is a really old question but had the same issue. Did a reset of Windows. After re-install I had about 10% of my available space to shrink.

I first tried @Fazer87's answer, which did reclaim some space, but not a lot. For some reason I remembered always finding the hibernate file taking up space and thought maybe it was locking something so I ran:

powercfg -h off

Immediately after running the above command, and without rebooting, my disk management now shows the full available space I would expect.

SolidSloth
  • 71
  • 1
  • 2
5

Take the guess work out of it by just opening the "Event Viewer" and going to Windows Logs then Application and look for entries where Source = Defrag. Mine had this to say:

The last unmovable file appears to be: \System Volume Information\{e5ea2453-8708-11ea-bb4c-1c1b0dfeec7e}{3808876b-c176-4e48-b7ae-04046e6cc752}::$DATA

I would not have figured this out by myself. That file is swop file related and I had to do this for Windows 10:

  1. Right click on "This PC" and then "Properties".
  2. Then click on "System Protection"
  3. Select the drive you are having issues with and click configure
  4. The "Disable System Protection"
  5. Click on the tab that says "advanced"
  6. Click "Advanced again"
  7. The click on "Change" under "Virtual Memory"
  8. Change the settings for the drive you are having issues with and specify that it must use "No paging file"

Doing this should solve the problem. And this will answers some of the other questions you might have:

What is that folder?

That’s because Windows uses this folder for certain system-level features. The permissions are set to prevent users—and programs without the appropriate permissions—from tampering with the files inside and interfering with important system functions.

How do I get around this problem?

If you need to shrink the size of the System Volume Information folder, you can do so from the Control Panel. Head to Control Panel > System and Security > System > System Protection. Under Protection Settings, you can choose whether System Restore is enabled and control how much disk space Windows uses for System Restore points.

rockstardev
  • 611
  • 5
  • 19
  • 34
  • 1
    Thank you so much, this just saved me from pulling out all my hair! I found a file in the AppData folder of FileZilla, deleted it, ran the shrink check again, rinse and repeat until I got the actual amount of free space that was left on the device. (ps.: I'm not even sure that it was the actual file though, as the `::$DATA` suffix might denote alternate datastreams or something like that.) – Isti115 Sep 20 '22 at 23:30
-1

Turning off hibernation fixed mine.
So open a cmd prompt with admin rights and enter:

powercfg -hibernation off
zx485
  • 2,170
  • 11
  • 17
  • 24
  • It didn't work for me, so I tried powercfg.exe /hibernate off which I found on Microsoft website and it went through but didn't change the shrink volume – Asaf M Apr 24 '20 at 10:35
  • disable System Protection helped – Asaf M Apr 24 '20 at 11:03
-1

I use Minitool Partition Wizard (free version). It increased the shrink of my drive from 7Gb (Windows) to 50Gb (Minitool Partition Wizard).

Steps:

  1. Select the partition you are interested in. E.g. C:.

  2. Click Move/Resize Partition from the left action panel.

  3. Scroll bar to choose how much you want to shrink it.

It will restart your computer and job done.

user3507584
  • 307
  • 4
  • 14
-2

Gparted seems to recommend to hell with diskmgmt.msc shrink, but rather, just go ahead with the re-partition chopping off all the (mid disk) system files (paging files, hibernation file and system restore files as mentioned above) and then use the pre-created system recovery disk to restore sense to your C drive if Windows does not boot.

Turning off paging then defragging took hours with no reduction in post-shrink size and likewise turning off hibernation did nothing for me at all. Plus I have already cloned my hard disk to another hard disk of the same (1TB) size. My problem is allowing me to use a 500GB SSD.

So I created a System Recovery Drive on an 8GB USB, Gparted my main drive to half or 480GB, inserted my recovery drive (that took a couple of hours to make) and my recovery drive was ignored in the boot!

But, Windows on the halved disk booted fine. I just ran a disk check and repair (and there seemed to be mention of "10 of 10" repairs? maybe) and windows has booted fine. I have turned my paging file back on. I still have my 1TB HDD clone, so I will now go ahead with Clonzilla clone to my 500GB SDD.

I did that but alas clone partition does not move the MRB.

timtak
  • 165
  • 1
  • 5