10

I want to shrink C: drive by at least 30 GB but I can't go above 13GB using Windows 10 disk Management tool when 130GB is free

See Here See Here

Why is the available shrink space so low even when 130 GB is free?

Arush Verma
  • 103
  • 1
  • 1
  • 6
  • A lot of reasons. The most common - some metafile location, shrinking cannot move it while preparing/performing. – Akina Feb 07 '19 at 09:08
  • how do i recover the unaccessible space? I tried to optimize the drive .no luck. help – Arush Verma Feb 07 '19 at 10:50
  • Use third-party defragmenter (for example, Piriform Defraggler) and perform metafiles defrag and then free space defrag. Then try to shrink. – Akina Feb 07 '19 at 11:03
  • And create another screenshot. Where shrink window do NOT mask the graphic drive partitioning info. – Akina Feb 07 '19 at 11:05
  • @Akina Okay wait. – Arush Verma Feb 07 '19 at 11:10
  • @Akina Please check I've added new screenshot. Disk 0 is samsung SSD – Arush Verma Feb 07 '19 at 11:28
  • Have you tried to disable the page file? As much as I hate supporting the company, Pitform’s Defraggler, will provide a more detailed view of the file allocation on the drive. Provide that screenshot please. Reinstall of Windows isn’t required in this case. – Ramhound Feb 07 '19 at 11:59
  • @Ramhound Tried disabling pagefile. no luck. I've added screenshot of defraggler. It clearly shows some files are stored at the very end of the drive. Still I don't understand why windows won't optimize the drives and remove such files and let me shrink it. – Arush Verma Feb 07 '19 at 12:48
  • Look - there is some special file(s) colored with beige. It is the reason you cannot shrink more than 13 Gb. Look what file(s) is it (drag mouse over and do not click/move 1-2 sec., or, in contrary, double-click any square and look), then move them forward. Then use the optimiation regime which merges unallocated space. – Akina Feb 07 '19 at 13:34
  • @ArushVerma - When you disabled your pagefile, did you optimize your drive, before you attempted to shrink the partition? – Ramhound Feb 07 '19 at 19:13
  • @Ramhound yes.It won't work otherwise. – Arush Verma Feb 09 '19 at 08:36

2 Answers2

8

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:

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

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,

Fazer87
  • 12,520
  • 1
  • 36
  • 48
  • thanks for such a detailed answer. I'll just try it out and get back to you. :) – Arush Verma Feb 07 '19 at 12:50
  • Thank you very much. It worked like a charm. Cheers :D – Arush Verma Feb 07 '19 at 14:48
  • 2
    The first time I tried to disable the page file my screen froze and I needed to force shutdown, and when I booted back in, the settings were unchanged. The second time it worked without a freeze, I rebooted and ran "Optimize" on my `C:` drive (I'm not sure if it counts as a defrag but it was the only option I saw when I searched for "defrag" in start menu. This drive is also an SSD and I'm not sure if SSD-s should even be defragmented.), and the available shrink space remained unchanged, i.e. 180 GB less than the free space. And this is a new computer. A downvote for this answer from me. – geras Dec 01 '20 at 23:17
  • Pagefile was the culprit. Change didn't take the first time (pilot error). Much appreciated! – IdusOrtus Mar 30 '21 at 21:44
  • you're very welcome, glad it helped :) – Fazer87 Mar 31 '21 at 16:56
  • 2
    Pagefile deactivation didn't help. – Kuronashi Apr 14 '22 at 09:03
1

The Windows option to shrink space doesn't move existing data. Data that is at the end of the drive is blocking the shrink process. If your 1 KB text file was written to the end of the partition you wouldn't be able to shrink it at all. You can try to use a defragmentation tool, which does move existing data, or you could use a third party tool for the shrink altogether. Which is considered risky because you're possibly modifying the partition content without Windows knowing about it.

Seth
  • 9,000
  • 1
  • 19
  • 34
  • I tried, Defragmentation doesn't help either and as you've said using 3rd party apps is too risky. Then I'm only left with formatting the drive and reinstalling the windows. Then try shrinking drive again. Or do I have any other way to possibly fix this ? – Arush Verma Feb 07 '19 at 11:57
  • 1
    Use a defragmentation tool that can compact space. Disable the page-file and swap space before defragmenting and return after resize. – harrymc Feb 07 '19 at 12:32
  • 1
    If you are reinstalling Windows using a regular image you can just set your partition size during installation. – Seth Feb 07 '19 at 12:39