Selling/Donating old machine with SSD...Erase?

GTaudiophile

Lifer
Oct 24, 2000
29,767
33
81
Every couple of years I have enough (decent) spare parts around that I can cobble together a nice machine for donation. I sometimes prefer this option to straight-up e-waste recycling. I either donate/give to a colleague, friend, or even to Good Will.

My question concerns SSD drives. Should I decide to include one in the donation build, then what is the best method to securely wipe/delete all data and to what extent is the data still recoverable afterwards?
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
240
106
The SSD should have a Secure Erase utility associated with it. I would exercise that and then install a decent Linux distro to go with the donation. That should take care of any previous data.
 

Burner27

Diamond Member
Jul 18, 2001
4,452
50
101
The SSD should have a Secure Erase utility associated with it. I would exercise that and then install a decent Linux distro to go with the donation. That should take care of any previous data.

+1
 

GTaudiophile

Lifer
Oct 24, 2000
29,767
33
81
Thanks for the suggestions. I don't see any specific secure erase utilities offered by Corsair or Crucial.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
To my knowledge only Intel and Samsung offer secure erase utilities. You can securely erase any SSD using Parted Magic or a modern Linux distribution. I've used a live Ubuntu before and a series of terminal commands to securely erase an SSD. It's a bit of a faff but works.
 

GTaudiophile

Lifer
Oct 24, 2000
29,767
33
81
To my knowledge only Intel and Samsung offer secure erase utilities. You can securely erase any SSD using Parted Magic or a modern Linux distribution. I've used a live Ubuntu before and a series of terminal commands to securely erase an SSD. It's a bit of a faff but works.

Are there any resources out there that discuss data retrieval after such secure erase methods?

I guess if I am worrying too much, I should just donate without the SSD :p
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
Data retrieval is not possible after a secure erase.

With a HDD, data is never erased, it is overwritten. To securely erase a HDD you have to overwrite your data with junk data, often multiple times to make it impossible to recover. The HDD is never erased or empty, it is just full of junk data instead.

SSDs work differently. The storage cells (NAND) cannot be overwritten, they have to be erased first. The secure erase does just that, it actually erases each NAND cell so it is blank, in every sense of the word. Once it is blank, it then then ready to accept new data.
 

ElFenix

Elite Member
Super Moderator
Mar 20, 2000
102,402
8,574
126
the SATA spec includes a secure erase command. if it's implemented correctly, it's supposed to erase even the non-user areas of an SSD, iirc.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
Secure Erase and TRIM do not erase the NAND. Otherwise how could it take only 2 seconds?

What Secure Erase does is reset the FTL or mapping table, which keeps track where data was stored. Basically it is a conversation table between logical LBA (what the host thinks how data was stored) and physical NAND address - how data is really stored. By erasing or resetting this table, all sectors will be free and unwritten from the viewpoint of the host. TRIM just 'resets' individual sectors or groups of sectors, while secure erase resets the whole table.

Secure erase is more comparable to a quick format; everything will be gone from the viewpoint of the filesystem. But actually only the metadata is gone; the actual data is still stored and can be retrieved with careful data recovery techniques.

The same applies to TRIM and Secure Erase. The host will see the SSD as being empty, but in fact it is not. Should one have access to advanced laboratory equipment, you can retrieve data from the individual NAND chips. This data cannot be easily reconstructed into 'files' - but if one would put enough resources into it, many data would be able to be recovered.

This means SSDs cannot be erased with a guarantee that data recovery is absolutely impossible. Even writing random stuff to the SSD will not achieve this, because you cannot guarantee you have overwritten the spare space.

Destroy the SSD if it contains state secrets or otherwise data that people want to invest millions in order to retrieve it. If you just care about privacy, a secure erase or TRIM erase (quick format under Windows) ought to be enough.
 

fuzzymath10

Senior member
Feb 17, 2010
520
2
81
This might be a bit off topic but I always wondered if you filled up any storage device with garbage files (e.g. create a 1GB dummy file and copy it over and over), should that generally take care of data on the drive, not including compression? Unless a drive has more capacity than it says it has, I figured this should achieve the desired goal. Sure, the pointers to the old files may or may not be around, but the data itself cannot exist on a drive filled 100% with new data...?
 

GTaudiophile

Lifer
Oct 24, 2000
29,767
33
81
Ok. It sounds like the secure erase option is probably good enough for 99.9% of the time. I'll try think of how important the work-related data I've saved and deleted on this SSD could possibly be if recovered by the 0.1%.
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
Secure Erase and TRIM do not erase the NAND. Otherwise how could it take only 2 seconds?

Guess you've never seen how NAND is physically constructed at the semi conductor level. Yes it's possible to erase the entire structure in seconds.

Selectively? No, that's slow. But the entire thing all or nothing? Yup.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
There is a difference between wiping the FTL and actually erasing the NAND.

In the article you linked to, you can see HDtune screenshots where TRIMing or secure erasing would lead to different benchmark scores. The only reason for this is because if you read data from an SSD which the SSD knows is not in use, it won't even try to read from the NAND.

If you buy a new unused SSD, its FTL (Flash Translation Layer) will be empty. This means that any read request you perform will not actually read from NAND, but rather return zeroes.

This is a crucial difference between modern SSDs and harddrives. A harddrive cannot know whether a certain block of data is actually in use or not - only the small DRAM cache can do that which is severely limited in size. Opposite to this, SSDs use a FTL mapping table that is stored in DRAM that allows the SSD controller to know which blocks are in use.

The result is that, if you perform a HDtune benchmark, you can see very easily which LBA spots contain valid data, and which spots do not. Any block requested by the host that is not included in the FTL, means the SSD doesn't even have to try to read from NAND. It also wouldn't know where to read from; since SSDs do not have 1:1 logical LBA versus physical LBA like harddrives do.

In HDtune benchmark, you can see the throughput graph fluctuating. If you perform overprovisioning, you will see this portion having a very solid high performance horizontal line while other spots show wildly fluctuating throughput. In addition, random seeks can be separated into two lines: the upper (slower) line are seeks to LBA spots which contain valid data, while the lower (faster) line are seeks to LBA spots which do not exist in the FTL table. This is much faster because you are only communicating with the controller itself; not the NAND.

You can TRIM all LBA space in one second, but that doesn't mean the NAND get erased. Instead, all that happens is that the FTL is updated to reflect the new state of 'claimed sectors' which the SSD has to remember. All the other sectors, the SSD can do to it what it wants. Depending on the implementation of garbage collection (GC) with either agressive/background GC (Samsung) or lazy/foreground GC (Intel) this will lead to the periodic erasing and reallocation of TRIMed space.

So to make things simple, the controller simply knows which spots have been written to, and won't even try to read from NAND in cases where it knows the data has to be zeroes - either because the SSD is brand new and that spot never has been written to, or because that spot has been TRIMed in the past. Regardless of whether GC succeeded, the controller will return zeroes without even reading from the NAND.

As for erasing all NAND at once; you should be able to disqualify this theory by looking at power consumption. SSDs use the most power when erasing NAND. If you do this in all NAND chips, this ought to be very noticeable since nothing will lead to a higher power consumption than something like this.

What actually happens is that the garbage collection which runs periodically (aggressive GC) will scan for unused portions and erase these in background so that these NAND pages are ready for reprogramming with new data. This does not happen when you TRIM certain LBA or even all LBA space.