0

ECC RAM for reducing corruption errors on servers.

Why there is no ECC RAM type device invented to bypass bad sectors in HDD?

  • Is this a spinning drive or a solid state drive? – Moab May 23 at 13:42
  • Spinning one, internal HDD . – Tom Cobalt May 24 at 3:28
2

Why there is no ECC RAM type device invented to bypass bad sectors?

Your question is based on an erroneous assumption. Mass storage devices do employ ECC for error detection and correction of data in sectors.

But the correction capability is limited.
The typical ECC appended to the data of a sector is capable of detecting errors, and then providing the correction for a short burst of bit-errors spanning a finite length.
Such an error burst is the characteristic failure of storage media.

HDDs traditionally used a 7-bye Fire code that is capable of correcting an error spanning up to 11 bits in length.
Seagate literature indicates that later HDDs expanded the ECC size from 50 bytes (for 512-byte sectors) to 100 bytes (for 4K-byte sectors), but neglect to mention the correction capability in number of bits.
The ECC is traditionally append to the end of the data of disk sector.

SSDs which employ NAND flash also use ECC and have finite bit-correction capability.
In fact the NAND flash manufacturers have specifications for a minimum correction capability (i.e. number of bits) for their chips.
The ECC typically used are BCH (Bose, Chaudhuri and Hocquenghem) codes.
The ECC is stored in a separate area of the NAND chip from the data in the "out-of-band" area.

When the storage device reads a sector from the medium, the ECC is checked to determine if any errors occurred.
If no error is detected, then the sector data is transferred to the host.
If errors are detected but the number and span of errors is within the ECC capability, then the sector data is corrected, and then transferred to the host with the status of soft read error.
If errors are detected and the number or span of errors is beyond the ECC capability, then the read is deemed a failure and the host is notified of an uncorrectable read error.

An ECC of a given length has finite correction capability.
The amount of additional storage devoted to ECC overhead is a trade-off between data capacity and data redundancy for integrity.
ECC is chosen for a minimal correction capability of minor media flaws.
As the number of media flaws increase during the life of the storage device, bad block handling, either by the integrated controller and/or by the host's filesystem/OS, is expected to deal with this next level of deterioration.
Schemes such as RAID, Redundant Array of Inexpensive Disks, also try to accommodate this deterioration.
IOW the economics of expanding ECC to eliminate future bad sectors does not make sense.

| improve this answer | |
1

You are confusing two different things. Error-correcting code memory (ECC) is used to protect computer memory (RAM) from corruption.

From Wikipedia:

Typically, ECC memory maintains a memory system immune to single-bit errors: the data that is read from each word is always the same as the data that had been written to it, even if one of the bits actually stored has been flipped to the wrong state.

"Bad sectors" refers to storage mediums, such as hard drives, solid state drives, and flash drives. Bad sectors typically are unrecoverable and all data on them are lost. The sectors are marked as being bad and are no longer used. Bad sectors are commonly physical damage to the disk. For example a hard disk drive platter's magnetic oxide coating no longer able to hold a magnetic state, or a SSD cell being worn out over time.

There are technologies that can preserve hard drive data from being lost. One example is RAID, but it has its limitations. You can lose entire disks without losing data, but it cannot prevent corrupted data from being written to disk. There are also file systems dedicated to data integrity such as ZFS. This is why it is common for servers to use one or more of these technologies to mitigate data corruption and loss. Of course, all of them should be doing backups, just in case everything is destroyed.

| improve this answer | |
1

Hard disks already use error correction to detect and protect against small amounts of errors.

Every sector has an ECC area.

enter image description here
The image above is from HDD inside: Tracks and Zones

For every sector that is read the hard drive uses a ECC code to detect whether what was read was correct and for a single bit errors or perhaps even a few bits it can correct the error. If there are too many errors or the sector is entirely unreadable there is nothing any software can do.

To see more about how data is physically structured on hard disks you should read HDD inside: Tracks and Zones

| improve this answer | |
0

I believe this is because the layer of indirection that would allow bad memory to be bypassed by the memory module would introduce unacceptable latency even in the case where there were no errors. That said, as long as the bad memory weren't critical unpaged kernel memory, operating systems can recognize ECC errors and avoid using those pages. This question & answer describes some details about this process.

| improve this answer | |
0

Main reason is there are no bad sectors (bad cell strictly) in DRAM:

(1) Bad cell rate in DRAM chip is lower than flash memory chip, then it is normal that DRAM chips with bad cells are thrown away (with spare cells some chip with very few bad cell may still work ). Flash memory chips have too many bad cells, if you throw every flash chips with bad cells then there won't be usable chips at all.

(2) DRAM chip is fully tested before shipment, and after that the chance of new bad cell is very low. But after shipment flash chips will continue to have more bad cells.

DRAM chips's ECC is to correct one bit error or detect two bit error for every 64bit of data. This error is due to soft error which is commonly due to stron EM field disturbance, not due to bad cell. If you have bad cell after shipment then you replace the DRAM module.

On the other hand, flash chip's ECC can correct more bits of errors which are due to bad cells.

| improve this answer | |
  • i made changes to my question. – Tom Cobalt May 23 at 5:49
0

HDD sectors do in fact contain forward error correction FEC that is conceptually very similar to ECC on RAM.

The size of the FEC relative to the sector size is precisely why HDDs have been moving from 512 byte sectors to 4096 byte sectors - this reduces the overhead in absolute terms. It became necessary because as bit densities in HDDs went up, they have been needing more and more FEC, and enlarging the sectors is a way to get the data:parity ratio back into a reasonable range that doesn't sacrifice too much raw capacity.

| improve this answer | |
  • "HDD sectors do in fact contain forward error correction FEC" -- Storage devices do not use a concept for communications. – sawdust May 23 at 22:56
  • @sawdust - not sure what you mean. Communications protocols used by storage devices do in fact have ECC-like functionality built in. SATA, SAS, NVMe, even old IDE and SCSI protocols have checksums on data packets. – Gordan Bobic May 23 at 23:04
  • SATA uses a CRC. See superuser.com/questions/641219/… CRC and checksums are not "ECC-like" because they have no correction capability. Regardless the mention of "bad blocks" in the question refers to the storage aspect of HDD rather than the host interface. – sawdust May 24 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.