How To Recover Data From TRIM Enabled SSDs?

Solid State Drive (SSD) is an electronic storage device which has become quite popular in the past few years because of its various advantages. SSDs are fast, sturdy, compact, and noiseless. Hence, they are preferred over Hard Disk Drives (HDDs), particularly when faster performance is desired, and the cost is not the first consideration. SSDs are also used with devices like mobile phones due to their compactness and are a boon to such devices.

Further, HDDs —being mechanical drives—are prone to failure compared to SSDs, which makes data loss more likely in their case. However, when compared to HDDs, the process of data recovery is more complicated in the case of SSDs. There are warning signs of SSD that indicate that the SSD is going to fail.

This is due to a mechanism called Garbage Collection, which operates on all SSDs, and the TRIM command, which is supported by many SSDs. Together, these processes permanently remove deleted data to free up space for new data in SSDs. In contrast, on HDDs, deleted data remains recoverable until it’s overwritten, making recovery easier.

In this blog, we’ll discuss everything you need to know about data recovery from SSD in the TRIM environment, and the prevention of data loss caused due to TRIM.

Table of Contents:

  1. Understanding the TRIM Command
  2. How Does the TRIM command make SSD Recovery complicated?
  3. How to Recover Your Deleted Data from a TRIM-Enabled SSD?
  4. Conclusion
  5. FAQs

We’ll also discuss the TRIM command in detail and the Garbage Collection process, as the TRIM command works in coordination with it.

Understanding the TRIM Command

The TRIM command is a critical feature in SSDs. It informs the SSD which data blocks are no longer in use and can be wiped clean. This enhances the SSD’s performance by preventing unnecessary copying of deleted data (during garbage cleaning operations), making room for new data, and speeding up write operations. It also makes your SSDs last longer because it can reduce the wear on the SSD by minimizing unnecessary write operations.

Here are some important points worth knowing about TRIM:

  • The TRIM command is issued by the operating system to the SSD.
  • When the TRIM command runs, the operating system instructs the SSD to wipe out the data in the specified blocks.
  • If you look at these blocks with specialized software, like a hex editor, you will see that they are filled with zeros, meaning the data is permanently erased.
  • This deletion process happens very quickly. If you delete a file on a TRIM-enabled SSD, the data is lost almost instantly when the TRIM command is executed. This can even occur during system startup.

How Does the TRIM Command Make SSD Recovery Complicated?

The TRIM command enhances the performance of an SSD, but as said, it complicates the data recovery. As you delete a file, the TRIM command is issued by the OS to the SSD about the deletion. This notification to SSD prevents unnecessary copying of deleted/stale data by the Garbage Collection mechanism, improving performance. Now the Garbage Collection does its second job and removes this stale data, making it complicated to recover.

Here’s what happens when Garbage Collection runs with TRIM:

  1. Valid data is copied and relocated to an empty block—memory space comprised of hundreds of pages.
  2. Invalid/stale – Unable to copy the data
  3. The whole block, where the data was copied from is purged.
  4. The block gets emptied and freed up to be written.

How to Recover Your Deleted Data from a TRIM-Enabled SSD?

Recovering data from a TRIM-enabled SSD is challenging. Here’s how you can approach it:

1. Check if TRIM is Actually Enabled for Your SSD

Sometimes, even on a TRIM-enabled SSD, the function may have been manually disabled. If TRIM is disabled, you can recover your data using data recovery software. Follow these steps to check the TRIM status:

  1. Open Command Prompt:
    • Press Windows + R, type  cmd , and press  Enter .

select-Command-Prompt-Stellar

  1. Enter the Command:
    • In the Command Prompt, type  fsutil behavior query disabledeletenotify  and press  Enter .
  1. Interpret the Results:
    • If you see DisableDeleteNotify = 1, TRIM is disabled.
    • If you see DisableDeleteNotify = 0, TRIM is enabled.

2. If TRIM is Disabled, use Data Recovery Software

If the CMD window shows you that TRIM is disabled (DisableDeleteNotify = 1), you can proceed with data recovery software like Stellar Data Recovery. Here’s how:

  1. Install Stellar Data Recovery Software on your computer.
  2. Run the software and select the drive you want to scan for deleted files.
  3. The software will show you a list of recoverable files. Preview them and save the files you need to a different storage device.

3. If TRIM is Enabled, Disconnect Your PC and Contact Data Recovery Services

If TRIM is enabled (DisableDeleteNotify = 0), recovering data is much more complex because the TRIM command quickly erases deleted data blocks. In this case, timing is critical. Follow these steps:

  1. Disconnect your PC or Mac from the power source immediately to prevent the TRIM command from erasing more data.
  2. Contact a professional data recovery service. These experts use advanced techniques and proprietary tools to recover data from TRIM-enabled SSDs.

You can contact Stellar Data Recovery Solutions. We have extensive experience working with all kinds of SSDs from major manufacturers. You can be sure that even if there is even the slightest possibility of recovering your data, we will recover it.

We have labs in 14 cities across India and can assist you in securely sending your SSD to our lab. Explain your case to us, and we will guide you on the next best steps.

Note: To avoid facing the challenging situation of recovering data from a TRIM-enabled SSD, you can disable the TRIM command. Disabling TRIM can prevent immediate data erasure, making it easier to recover deleted files. Here are the steps to disable TRIM on your SSD:

How to Disable TRIM on Windows?

Note:

  1. Disabling TRIM reduces the performance of SSD.
  2. TRIM would stop working for data deleted after disabling it.
  3. Keeping TRIM disabled may help in data recovery, provided you’ve stopped using your SSD as soon as you lose data.

You can disable TRIM to prevent it from running on your SSD by following the steps given below:

Step 1: Click the  START  button and type  cmd .

Step 2: Right-click  Command Prompt .
Click on the Windows Search bar and type “CMD" - Stellar

Step 3: Click  Run as Administrator  to launch the command prompt as an Admin.

Run-as-administrator - Stellar

Step 4: Type  fsutil behavior set DisableDeleteNotify 1  and hit  Enter .

cmd-fsutil - Stellar

Step 5: Type  fsutil behavior query DisableDeleteNotify  and hit  Enter  to check if it is disabled or not.

If the result is  DisableDeleteNotify = 1 ; TRIM is disabled.

NOTE: If you want to enable TRIM, replace 1 in the command fsutil behavior set DisableDeleteNotify 1 by 0.

Conclusion

In this blog, we discussed data handling with TRIM, the Garbage Collection process in SSDs, and the need for a Professional Data Recovery Service provider due to the complications involved.

It’s comparatively easy to recover data from SSDs in a Non-TRIM environment, as the SSDs aren’t notified about the deletion. Hence, they keep copying your data to a new empty block. However, data recovery isn’t impossible even in a TRIM environment. Data Recovery Experts can still recover data. So, don’t lose hope; stop using your SSD and contact a Data Recovery Expert for help.

FAQs

1. Does Disabling TRIM Affect the Performance of My SSD?

Yes, disabling TRIM can reduce your SSD’s performance. TRIM helps maintain the drive’s speed and efficiency by preventing unnecessary write operations. Without TRIM, the SSD may slow down over time as it has to manage more data blocks during write operations.

2. Can I Re-enable TRIM After Recovering My Data?

Yes, you can re-enable TRIM after recovering your data. This will restore the performance benefits of TRIM. To do this, you simply need to enter the command fsutil behavior set DisableDeleteNotify 0 in the Command Prompt on a Windows system.

3. Can Data Recovery Software Bypass TRIM to Recover Deleted Files?

No, data recovery software generally cannot bypass the effects of the TRIM command. Once TRIM has marked the data blocks as free and the SSD clears them, the data is irretrievably lost. Professional data recovery services have more advanced techniques to attempt such data recovery.

Comments (1)
  1. Joep May 31, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *