View All R&D Articles

How File Deletion Is Different For Solid-State Drives and Hard Drives

August 15, 2018

Everybody makes mistakes, but when those mistakes involve deleting crucial files or accidentally formatting an entire drive, they’re pretty painful.

The good news is that most deleted files and formatted disks

SSD interior shot showing NAND chips

 are recoverable, provided that you take immediate action to stop the drive from overwriting your data. The bad news is that you don’t have much time—particularly if the files in question are located on a solid-state drive (SSD).  

We’ll explain why in a moment, but first, an important note: If you’ve accidentally deleted data, immediately turn off your computer. Do not turn the drive on until you’ve got a plan of action, and if you’re at all unsure of how to proceed, call us at 1-800-237-4200 to discuss your case.

First, it’s helpful to understand how solid-state drives and hard-disk drives write data.

When an HDD writes data, it’s capable of writing over old data without losing efficiency. Therefore, when a user deletes a file, the hard drive will simply note the command, then write over the deleted file the next time it receives a write command.

To put that in a practical example, let’s say that you decide to delete file A. The hard drive removes file A’s entry in the file tables. Later, you want to write file B; the hard drive starts writing file B over all available space—possibly including some of places where file A’s data still technically exists.

But let’s say you’re about to write file B when you realize you made a mistake. File A’s data is still in place, so all you need to do is figure out how to restore the entry on the file table that tell the computer where the data is located. Many data recovery programs can do this effectively (although the safest course of action is to get the drive to a professional).

But solid-state drives use different technology to store data.

A solid-state drive has to completely clear each block of data before it writes new data to the drive. It can’t simply overwrite; it has to delete, then write. That might not sound like much of a difference, but it’s extremely cumbersome when a computer needs to write a huge amount of information in a short amount of time.

There’s another issue. Solid-state drives store bits of data as pages within blocks. To write data, the drive needs to delete the whole block—but sometimes, it needs to keep a certain page. Conversely, if the drive wants to delete one page, it has to move all of the other pages to a temporary location, delete the entire block, then move the pages back. Obviously, this isn’t exactly efficient.

To make the process more efficient, solid-state drives run a TRIM command to identify unused blocks of data and clear them, which improves the drive’s performance significantly; when the computer needs to write new data, it doesn’t need to wait for the SSD to “free up” blocks by deleting data. The computer also sends a TRIM command every time you decide to delete something so that the blocks in question can be deleted.

When you delete files or format an SSD, the files may still be recoverable.

However, the longer the drive operates, the lower your chances. The TRIM function will eventually delete the data, regardless of whether you’re trying to write new data, and most drives will execute the TRIM function very quickly.

Most computers with SSDs will have TRIM enabled by default. As such, if you accidentally delete data from an SSD, the best course of action is to immediately disconnect power from the drive. Don’t shut the computer down—unplug it from the wall. Get the SSD to a qualified data recovery company.

If you’re especially tech savvy, you might consider cloning the SSD with another computer, but you’ll need to make absolutely sure that the TRIM command is disabled. To discuss your specific situation with a data recovery engineer, call us at 1-800-237-4200.