0

Recently I used Disk Drill on my laptop with SSD and it showed that some deleted data can be recovered, but I checked if the trim option in my SSD is turned on, so how it is possible? Is it because sending a trim request can be interrupted?

5
  • 2
    TRIM commands are usually not sent immediately after delete, instead they are accumulated and then sent may be once a day or a week. So recoverable data does not mean TRIM does not work.
    – Robert
    Commented Sep 6, 2022 at 20:46
  • @DrMoishePippik Do you have a reference for your statements? because TRIM means simply to update the free/used bit set inside the SSD. Assuming an 1TB SSD and a block size of 4K that would be 250,000,000 bits required for such a free/used table. That means the table would have a size of about 32MB, so a TRIM command would write at maximum 32MB. That is IMHO not enough to affect an SSD wear out, even if you would write it once a minute.
    – Robert
    Commented Sep 7, 2022 at 6:59
  • Guys I've just trimmed SSD manually with such Powershell command: "Optimize-Volume -DriveLetter C -ReTrim -Verbose" and after that, Disk Drill shows that there are much data that can be recovered (apart from the existing files of course) so is there any method to completely erase unused space in SSD?
    – Maciaz99
    Commented Sep 7, 2022 at 11:32
  • @Robert Excessive TRIM commands could lead to excessive garbage collection by the SSD controller, with some more impact on the wearout. In which case it would be a flaw in the controller design, which doesn't have to continuously perform garbage collection upon each TRIM command he receives.
    – PierU
    Commented Sep 7, 2022 at 11:56
  • @DrMoishePippik. No excessive trimming does not wear out the drive or shortens SSD life. TRIM command simply informs the drive about sectors the OS no longer needs/uses. In itself that does not effect wear. Commented Oct 16, 2022 at 20:59

2 Answers 2

3

Not only (as said in the comments) the TRIM commands are not sent immediately after a file deletion, but in addition the TRIM command in itself does not erase anything on the SSD, it just tells the SSD controller which sectors are no longer occupied by any file. This information is used by the controller to optimize the free space (this is called the garbage collector mechanism): at the some point the data has chances to be physically erased by the controller, but you don't know when.

7
  • So am I right, that the best way to erase data in SSD is to create empty files with some garbage like random letters to overwrite this unused space?
    – Maciaz99
    Commented Sep 7, 2022 at 12:47
  • @Macios216 If you really need to, yes, it will do (but don't do that too often if you don't want to shorten the life of your SSD).
    – PierU
    Commented Sep 7, 2022 at 13:36
  • Okay, thanks for the answer. I am going to do it once.
    – Maciaz99
    Commented Sep 7, 2022 at 14:14
  • But many/most controllers will return zeros when you try to access such sectors. And in many cases Windows TRIM is virtually immediate. Commented Oct 16, 2022 at 15:46
  • @JoepvanSteen AFAIK the default TRIM in WIndows is not real time, it's a global TRIM sent once a week (can be seen in the defrag utility. And I wouldn't bet that any controller returns zero when reading a sector that has trimmed but not "garbage collected" yet.
    – PierU
    Commented Oct 16, 2022 at 16:57
0

TRIM affects the clusters that were allocated to a file at time of deletion. If we for example take NTFS, the file system entries for the files themselves are not trimmed and such can be detected by file recovery tools as long as they were not re-used by the system. There's a good chance however they reference 'trimmed' clusters so the files you recover will be zero-filled (most common).

As long as the clusters aren't re-used at file system level many file recovery tools will conclude the clusters have not yet been overwritten and assign a 'good' or 'recoverable' status to files, even if the clusters were in fact trimmed. Very few tools actually access these clusters to verify they contain data and if the data matches file extension.

Some times TRIM may not fire or be dropped from queue, but Windows sort of immediately fires TRIM commands. So default is that files can not be recovered once deleted from a TRIM capable drive. There are exceptions though, for example Windows may withhold TRIM command because it's not certain about file system consistency.

TRIM = NOT actually erasing the data. TRIM simply informs the drive about LBA sectors ranges it no longer uses to store data. Many (most?) SSD's remove these ranges from 'LBA user space'. In case a request is received to read such sectors, by for example file recovery tools, it simply returns zero filled sectors even though the actual data may still exist (and is thus recoverable using data recovery hardware used by data recovery labs (such as Acelab PC3000).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .