SSDs, HDDs, Bad Blocks & Sectors – The Truth You Thought You Knew

All Articles Featured Discussion

What are HDDs?

Hard disk drives are nonvolatile data storage devices, meaning they retain information stored on them whether they are supplied power or not. They are comprised of many individual components, the actuator and read-write heads to name a few, all of which are vital for operation. Take me to the SSD section!

All of these moving parts make it a delicate piece of equipment, leaving plenty of room for something to go wrong. With all due respect to these awesome pieces of technology, they’re getting a bit outdated (seriously, 1956). But there are still plenty of them out there, so we can’t forget about them just yet.

How do They Work?

Hard drives store data on a multitude of spinning disks that are coated with a magnetic material called ruthenium. An actuator arm inside of the hard drive aligns read-write heads to interpret data that’s been stored magnetically (0’s and 1’s). A second motor exists for the purpose of rotating the disks several thousands of times a minute.

These heads often need to access data stored on several different sectors to complete a given command. Furthermore resulting in increased read times, because it may have to wait for the platters to complete many rotations.

As data continues to be stored and erased in random locations over time, this effect is amplified. Although we’re talking mere seconds, it really becomes noticeable as HDDs age.

To combat this annoyance, read up on disk defragmentation

Or get a solid state drive because they are immune to these delays.  This is one of the many reasons why HDDs are considered inferior to their speedy SSD brethren.

Bad Sectors on Your HDD

Bad sectors are little clusters of data on a platter that cannot be read for one reason or another. They are fairly common and have the potential to destroy the drive, along with your data. Bad sectors come in two different forms, or types: hard and soft.

Hard bad sectors are caused by physical damage. Whether it be knocked off a desk, a faulty mechanism in the drive, extreme heat, or anything of the sort, hard bad sectors cannot be repaired. But with some knowledge and common sense, they can be prevented.

Soft bad sectors are logical issues rather than physical ones. Soft bad sectors can happen as a result of error codes found in the sector not matching up with what’s actually there. Essentially, a miscommunication with regards to formatting. Soft bad sectors can be repaired by wiping the drive entirely, but it’s almost more trouble than it’s worth these days.

So, What Are SSDs?

Solid state drives are electronic storage devices that serve the same general purpose as HDDs. The difference is SSDs use a much more sophisticated process of storing data, increasing its speed, robustness, and cost.

One of the most important parts of any SSD is the controller. Think of it as the drives brain. An embedded processor executes code on a firmware-level and bridges the NAND memory components to the host computer.

NAND-flash memory

So what is NAND-flash memory? Information is stored in groups of memory cells comprised of individual floating-gate transistors, or cells. Electrons are stored Inside of the floating-gate transistor as 1’s or 0’s, where the data will reside until it is erased.

Electrons must penetrate the insulating material to be placed on the floating gate by a process called tunneling. Tunneling involves exposing the electrons to a very high voltage, which enables them to pass through the insulation and be stored. Below is a simple diagram of what a floating-gate transistor looks like.

Limited Life of Flash Storage

The downside to this process is that it causes physical degradation to the insulation material. And to reuse one data store on the floating gate, the whole gate needs to be erased and then rewritten. The cycle of programming and erasing in this way directly affects the longevity of each flash cell, resulting in a limited write endurance before the cell is completely degraded.

This is the reason that flash storage has a limited lifespan and fluctuates depending on levels of use.

Now that you know some of the science behind SSDs and NAND-flash technology, it is time to shed some light on bad blocks.

Bad Blocks on Your SSD

To reiterate, NAND-flash memory cells are neatly arranged on printed circuit boards to form rows of pages and columns of strings. Clusters of these strings and pages are called blocks. It can be rather confusing, so take a look at the diagram below.

Cells are marked invalid by the controller for a number of reasons, all of which are intended to balance the system. When a cell is marked as invalid it can’t be used again until it has been erased. In flash storage, data can only be erased by entire blocks at a time, not individual pages or strings.

And due to the nature of writing to flash storage, data on a given block is usually a mix of valid and invalid pages. And to make things even more complicated, in order to reinstate invalid pages, the valid data must be copied to an entirely new location so the whole block can be erased and reused.

This process is called garbage collection and plays a big part in another concept called write amplification, but we’ll save that for another time.

The issue at hand lies within the degradation of floating-gates that we mentioned earlier. No matter what, after a cell has gone through its maximum amount of program-erase cycles (P/E), it becomes unreliable and is removed.

Bad block management maintains a table of broken cells and replaces them with healthy cells that have not yet reached their maximum P/E cycles. The new block typically comes from spare cells that designers set aside for this reason, but if at any time a spare cell does not exist to replace the bad ones, data will be lost for good.

Read Disturb and Error Correcting Codes (ECC)

Due to what is called read disturb, when a particular cell is read over and over again, a nearby cell could also fail. Huge bummer, because this can cause a snowballing effect of bad news for your data. Luckily, the controller keeps track of the number of times each cell is read and moves data from cells about to be disturbed to new blocks.

When data is written, an error correcting code is paired with the data. During a data read operation, the controller calculates another ECC and compares it against the stored code. The controller knows an error exists in the data bits if the two codes do not match. The controller can usually adjust and fix the errors by using the discrepancy in the code, but that is not always the case.

Backup Your Data!

As the tech continues to advance, these issues occur less and less, but why not be safe? Always keep backups of your important data on external drives or in the cloud.

We hope you learned some valuable information about SSDs, HDDs, and their respective bad sectors and blocks. If your data is already long gone due to an issue we talked about, check out our store for a possible replacement!

Be sure keep an eye out for part 2 – The Ultimate Guide to Propriety Apple SSDs.

About The Author

Jase Fasiano

Jase is into all things tech, but some might say he's a bit of an Apple fanboy. He also comes up with the best answers when the beetstech staff plays Quiplash.

1
Leave a Reply

1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Recent comment authors
  Subscribe  
Notify of
Member
Richard Llamas

Thank you Jase for your blog on the nature of mass storage devices, which are a necessity for all our mobile devices, Notebooks, and workstations to function. Especially the point concerning SSD NANO storage; it gives the consumer a better idea of how and what SSD is about and can do for us. It also informs us that SSD’s are NOT infallible by design, and subject to corruption and fatigue just like any other physical component in our computing devices. With that in mind we can make a more informed choice on the brand/model of SSD storage to choose based… Read more »

Articles for repair pros, by repair pros.

No spam. Unsubscribe at any time. Don’t worry, we hate bad emails too.