Data corruption on disk - radumarias/rfs GitHub Wiki

It's possible that the disk will eventually become corrupted, causing some data loss. In such cases, replicas help, too. We can use consensus to determine which is the correct version of the file and replace the broken one.

Error-correcting codes

Additionally, we can use error-correcting codes like Reed–Solomon error correction, which will help recover the data in some cases.

Merkle tree

We can also use Merkle trees [https://en.wikipedia.org/wiki/Merkle_tree] to check file integrity.

Checker process

We need some processes that periodically check the data if it gets corrupted. They do that by obtaining a consensus on the Merkle tree of the valid file and comparing it to replicas in all nodes. If a shard is corrupted, it will be replaced by triggering a sync with other nodes.