How to prepare SSD drives for shrinking partitions in Windows?
I was trying to shrink a partition (Windows 10). For traditional hard drives, I can use the Optimize
Tool to defragment the hard drive to free up disk sectors towards the end of the HD and shrink the volume as much as possible.
However, I read that the Optimize
tool in Windows does not defrag SSD drives. Therefore, it's not of much use as it is for mechanic hard drives (for shrinking).
Is there a Windows tool that can "conceptually" move the sectors to the beginning of a SSD to help shrinking?
Ideally, I am looking for something from Windows or Microsoft.
Note: I looked around in Superuser, and related posts e.g. How to shrink Windows 7 boot partition with unmovable files are all about moving unmovable files for mechanical HD. They do not seem to address the issue of SSDs.
Solution 1:
Shrinking drives under Windows can be a pain in the rectum. You need to remove any ummovable files, then defragment it, then you can shrink it.
To remove files -
- Disable system Restore (Right click on Computer -> Properties -> System Protection -> System Restore)
- Disable Virtual Memory/Paging File (Right click on Computer -> Properties -> Advanced System Settings -> Performance (Settings) => Advanced Tab -> Virtual Memory (Change) -> remove paging file
Defrag the drive (Auslogics Disk Defrag is free and can do this)
Solution 2:
When I try to shrink the partition(Windows 10 and have only one partition--C drive which I need to shrink for install Linux) with Diskpart(console command tool), it didn't work and Disk management tool didn't work either. (guide from Shrink a basic volume | Microsoft Docs)
I think reason is SSD won't work with defragment optimise tool--I did use the tool before the shrink.
So I thought about doing SSD defragmentation but what I remember is that SSD won't need defragmentation like hard-disk drive so don't have much software to do this. And I only need shrink the partition.
So I decided to use free partition software.
First, I tried with MiniTool Partition Wizard Free but I can only find split function, not the shrink.
Next, I tried with AOMEI partition assistant. But in my case, program can't recognize my primary partition.
So I thought about to use the GParted but too big file(more than 300MB) to download so I didn't try.
And I tried with EaseUS Partition Master Free Edition and it worked--after shrink, I did reboot the machine and then it moved the fragments for shrink.
You should try number of partition software which will work for your system. You might try other partition software like Paragon Partition Manager Free, Macrorit Partition Expert, Active@ Partition Manager.
Solution 3:
The command you want is defrag /PrintProgress /FreespaceConsolidate
.
Defrag <Volumes> <Operations> [<Options>]
/U | /PrintProgress Print the progress of the operation on the screen.
/V | /Verbose Print verbose output containing the fragmentation statistics.
/X | /FreespaceConsolidate
Perform free space consolidation, moves free space towards
the end of the volume (even on thin provisioned volumes). On
tiered volumes consolidation is performed only on the Capacity
tier.