Answer the question
In order to leave comments, you need to log in
Does Windows 10 perform TRIM when changing partitions with standard tools?
Let's say the partition occupied 250 gigs, it was reduced to 200 through the disk manager, through the standard "shrink volume" function. Will TRIM be performed for the 50 gig tail region, or will Windows 10 simply reduce the size in the GPT / MBR table and be too lazy to free up space for the needs of the drive?
And as for deleting partitions through the disk manager, is the space under the deleted partitions freed up, or does it remain occupied forever (until a new partition is created on it)? Or after that you will have to run some third-party utility and do TRIM?
Unfortunately, I have no idea how to intercept ATA commands between the disk and I can't check it myself.
Answer the question
In order to leave comments, you need to log in
Did an experiment in VirtualBox with dynamically sized virtual media connected with the --discard on option on a Windows 10 guest, version 1909 build 18363.418.
And I found the following behavior: in Windows 10, TRIM is only performed on operations that involve the file system on the volume. During operations with the volumes themselves, TRIM is not performed.
When creating a new volume - Windows formats this volume, and when formatting, even a quick one, it runs through the area of the volume and does TRIM. If you create without formatting, then cleaning is not performed.
When reducing the volume size - Windows first transfers files from the reduced space to the left one, these operations occur using the file system - and the space under these files is freed through TRIM (but only where the files are, the empty one is not re-freed).
When increasing the size of the volume, alas, the attached area is not processed when I attached the "dirty" part of the media - then VirtualBox did not receive commands to clean up this part of the disk.
When you delete a volume - the space - is not freed, the disk manager simply removes the entry from the partition table in the MBR / GPT, putting a bolt on the space occupied by the partition. Therefore, if you delete a partition from the SSD using Windows and plan to leave the space empty in the future, first format this volume (a quick format is enough).
Therefore, the most guaranteed way to do TRIM is to boot into Linux, create empty partitions on unallocated areas and execute blkdiscard on them, then delete them. Windows is still too lazy to send commands when working with partitions to clean up the area under them.
Yes.
The file system treats a disk as a set of LBA addresses.
TRIM is a notification to the disk that information on some LBA addresses is no longer needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question