How can data be lost on an SSD drive?

4

I've seen several reviews stating that an SSD drive is ten times as fast as an HDD and is much more reliable in terms of data loss because hard drives have heads that can scratch the disks while SDDs don't. I was looking at M.2 cards that can be plugged into laptops in place of standard hard drives in particular.

However, at the store, I was told a few years ago, when laptops came with dual HDD and SSD configurations, that nobody is sure how long SSDs can hold data because nobody have tested them for very long and some believed it would become easier to lose data on them because data was written more than on mobile device solids state counterparts.

Above all, I was also told that if the power goes out and the battery is not plugged I you lose all data. Has this been resolved in modern computers by ensuring some part of the battery power is always there? How has this issue been resolved or do modern computers still have this issue?

Thanks.

Joselin Jocklingson

Posted 2018-10-20T14:01:38.503

Reputation: 163

Question was closed 2018-10-26T10:08:54.777

1

You will be helped by reading the Wikipedia article on SSDs. For one thing they don't require power to maintain their content. They never have.

– I say Reinstate Monica – 2018-10-20T14:25:08.377

1SSDs lifetime is now comparable to HDD, and losing all data on power failure is ridiculous.. – harrymc – 2018-10-20T14:28:07.090

1and, same as any structure, "Any data stored in fewer than three distinct locations ought to be considered temporary"... so you still need backups. – Tetsujin – 2018-10-20T14:33:12.350

1The person in the store was talking unmitigated garbage. A SATA (not m.2) add is a drop in replacement for a hard drive - m.2 are a small factor SSD with a different interface. SSDs have been extensively tested and are 10 times as reliable as HDDs and can last 5 years doing heavy writes. They are LESS likely to loose data then an HDD if there is a sudden outage because they write data much quicker, and write then erase data-They do not store data in RAM. Note that when they do fail they often do so catastrophically unlike HDDs which often fail slowly. – davidgo – 2018-10-20T18:33:29.760

@davidgo, why do you mention sata instead of m.2, which I believe is a more recent, better, interface? – Joselin Jocklingson – 2018-10-21T19:47:17.553

So, from a technical perspective, how does an SSD fail? It takes five years on average for an SSD to fail? Does it need to get wet with water or are there other ways? How do these normally fail? All data on them is lost at once when they fail (and it is not due to the power going out)? – Joselin Jocklingson – 2018-10-21T19:49:27.900

1m.2 is likely technically superior, but they require a different interface so they can't be put "in place of a standard drive" as you can with a data SSD.- Rereading your question this could be a matter if semantics if your laptop has am m.2 slot. – davidgo – 2018-10-21T20:07:09.130

No, my laptop doesn't have an m.2 slot, but can't I use an adapter? I didn't think SATA SSD drives existed. I thought SSD was a new technology developed only on new computers supporting m.2. – Joselin Jocklingson – 2018-10-21T20:43:56.733

Answers

7

Most SSDs use NAND, which retains data without power.

Most SSDs use electronic chips called NAND flash memory. NAND itself is non-volatile, meaning it retains its data even when power is removed, but data loss can occur in a number of different ways that are very different from how an electromechanical hard drive might fail.

Some devices, mostly discontinued, which are sometimes referred to as SSDs, use volatile DRAM as the storage media and therefore lose their data when power is removed. These "RAM disk" devices may have backup batteries which allow them to retain data for several hours after power is removed. You may be confusing NAND-based SSDs with these devices, which are not normally encountered in a consumer computing environment.


Although unlikely, an SSD can lose track of its data if its mapping table is corrupted, resulting in data loss. This can occur if power is unexpectedly removed while the drive is busy. Modern drives are designed to be resistant to this type of failure.

The failure mode you mention, involving unexpected power loss, is not simply because power is removed, but is due to the way SSDs manage data on their NAND. Some relevant background follows:

Each physical NAND cell can only sustain a finite number of writes. In order to avoid premature failure due to uneven usage of the underlying NAND, the SSD's controller—its on-board processor—actively spreads out writes and rearranges data as appropriate in a process called wear leveling.

However, the controller must still be able to keep track of where the data is and present it to the operating system in a consistent manner, no matter where on the NAND the data is. This function is known as the flash translation layer (FTL). As part of this FTL, the SSD controller maintains an internal mapping table which specifies where each block on the SSD as it appears to the OS is located on the physical NAND. Most SSDs have a DRAM chip, like the memory on your computer, to hold this mapping table. This DRAM is volatile, meaning its contents are lost when power is removed. Although this mapping table is ultimately stored onto the NAND itself, it is not rewritten onto the NAND frequently because of the aforementioned endurance limitations and because DRAM is still significantly faster than NAND.

Under certain conditions, it's possible for the mapping table to get corrupted due to power loss, most likely during a write operation. If the mapping table is corrupt, the data on the SSD is unreadable because the drive cannot determine where the data is on the NAND. To protect against data corruption, the mapping table is generally written and maintained in such a way that it remains in a consistent state essentially at all times and that recovery from a power loss is possible. Newer SSDs are designed to be very robust in the event of power loss, but it's still possible—even if unlikely—for mapping table corruption to occur, resulting in the loss of all data on the drive.

Some SSDs, especially enterprise models designed for use in servers and other critical applications, feature built-in capacitors that provide enough power to ensure that the mapping tables and (possibly) any data in the process of being written can be safely committed to the nonvolatile NAND in the event of power failure. Although this feature is rarely found in consumer SSDs, there are nonetheless drives like the Crucial MX500 which feature some degree of power-loss protection. Even if it cannot protect data that has not been fully written to the drive, power-loss protection helps ensure that mapping table corruption does not occur in the event of a power failure, no matter what the SSD was doing at the time, so any data already on the drive is safe.


Flash memory cells can leak charge over time, resulting in data loss or corruption, and heavily-used drives will not retain their data as long as new drives.

As for long-term data retention and data loss over time, flash memory operates by storing and sensing electron charges in an array of floating-gate MOSFETs. This electron charge can be changed by essentially forcing electrical charges through the insulator that forms the floating gate in each transistor to store data.

Over time, electrons can leak out of the floating gate insulators, resulting in data loss or corruption. This process may take many years for flash memory that has not seen much use, but an SSD that has seen heavy use will have worn down the floating gate insulation inside the NAND chips and will not retain its stored data as long. Eventually, the transistors will not be able to hold a charge at all, rendering them unable to store data.

To increase storage capacity and reduce cost per gigabyte, most modern NAND can hold more than one bit per cell, instead storing two (MLC), three (TLC), or even four (QLC) bits per cell. In order to do this, the device must be able to distinguish between four, eight, or 16 different charge levels, respectively, in the floating-gate transistor. This makes such devices more sensitive to changes in charge level, and therefore wear out faster. For modern forms of NAND, each cell can typically handle 1,000 to 3,000 write cycles before it can no longer reliably hold data. This is why SSDs have limited endurance, and why wear leveling is necessary.

For client or consumer SSDs, the endurance rating provided by an SSD manufacturer is the total amount of data you can write to the drive and still be able to expect it to retain its data for at least one year. This number has traditionally tended to be on the conservative side for warranty purposes, but is typically on the order of several hundred terabytes written (TBW) for modern SSDs. (For SSDs intended for enterprise or datacenter use, the retention requirement is a more lenient three months and is based on higher temperatures, reflecting the more intensive operating conditions typical of servers.)

Temperature also affects the endurance of NAND. The floating-gate insulators will leak charge faster at higher temperatures than at lower temperatures, which means it's best to store an unused SSD in a cool environment. On the other hand, NAND suffers less wear when written to at higher temperatures; a drive can wear out faster than expected if subjected to write-intensive workloads in low temperatures (e.g. 10 °C or less).

JEDEC slide showing how temperature affects data retention

The above image (from a JEDEC presentation explaining SSD specifications) shows how a drive's ability to retain data is affected by the temperatures at which the drive is active and at which it is stored. Because endurance is determined by the drive's ability to retain its data when not in use, a longer retention period for a given amount of data written implies higher write endurance.

All told, a lightly-used SSD will hold its data for several years, but if you've used your drive heavily, the data stored in it may not last as long before it starts to get corrupted or is lost. Periodically powering up the drive will allow it to refresh its stored data, and storing the drive in a cool location and avoiding extreme heat will help it retain data longer. Because of the way flash memory works, SSDs and flash drives are not an ideal means of storing data for long-term archival purposes; a better solution would be to use archival optical discs like M-DISC media, which are specifically designed and tested to retain data for extremely long periods of time.

bwDraco

Posted 2018-10-20T14:01:38.503

Reputation: 41 701

As for batteries, it sounds like OP might be confusing SSDs with "battery-backed RAM" disks. – user1686 – 2018-10-20T14:41:47.940

Thank you for your answer. May I also ask, why is it then that older computers had a dual SSD for the OS, and HDD for everything else? Is it that the price of SSDs has gone down so much that nobody wants this dual configuration any more? Thanks. – Joselin Jocklingson – 2018-10-21T20:56:08.800

1It's mainly a matter of cost. OEMs are trying to strike a compromise between cost and storage space, because they know consumers want speed and lots of storage. SSDs have gotten cheaper over the years and will continue to get cheaper over time, but they're still much more expensive per GB than hard drives. So while entry-level machines will continue to use SSD+HDD configurations, midrange and premium systems are increasingly moving towards SSD-only setups. – bwDraco – 2018-10-21T21:29:23.410

A great answer! – rahuldottech – 2018-12-10T21:17:08.183