How do you TRIM completely unused, unallocated, unformatted, unpartitioned space (but other volumes still exist) on an SSD in Windows 11, that used to contain data, for over provisioning? (For note: when I say "empty space" I mean space that is now unallocated, unformatted, etc., not necessarily unused space in an existing volume/partition.)
I've looked around and found a lot of answers for people asking similar questions about "empty space" that never contained anything (such as on a new drive), so a TRIM is unnecessary, and that's understandable. However, I used to have my entire SSD partitioned and formatted and had regularly nearly filled it up (certainly more than the unused space I'm trying to over provision now) and only recently realized there are many benefits to over provisioning that outweigh the loss of storage space. I didn't do a TRIM before shrinking the partition however, so the SSD may think there is still data in that now "empty space".
I am under the assumption that TRIMing a volume (C, D, etc.) only applies to the "space" (sectors/blocks, whatever) that volume occupies (or could potentially occupy, including its unused space), but does not TRIM outside that volume (presumably so it's not TRIMing space that only Windows doesn't know about).
So, if I want to be sure that the SSD firmware knows that space is available for over provisioning, how can I be sure it knows? Is there a command or tool to tell the SSD firmware specifically that it's for over provisioning, or how can I TRIM that "empty space" (that used to be used) outside any volumes?
If there is not a command or tool to TRIM the "empty space", would just creating a new partition/volume in the space I want for over provisioning, TRIMing that, and deleting it effectively do what I want?
blkdiscard
with--offset
and--length
(small enough--step
may be needed). If you are not sure if Windows has TRIMmed what you wanted, usingblkdiscard
from a live Linux distro is a feasible workaround; not very convenient, but it's a one-time operation. On the other handblkdiscard
will happily do what you tell it to do (as opposed to what you want it to do), regardless of existing partitions and filesystems, so you are one typo (or one brain fade) away from a disaster where you lose data.