Site icon

How to prevent errors on SSDs

Following work by Hector Martin and the Asahi Linux team on the internal SSDs in M1 Macs, there has been intense discussion over the reliability of storage media. At the heart is the problem of ensuring that pending writes are flushed to non-volatile storage in the event of sudden failure. Put more succinctly, if your SSD suddenly loses power, could it be left with serious errors as a result?

There are two main types of write error you need to guard against: file system and file data.

Those in the file system are the more serious, as they can render the whole storage inaccessible, or for it to require repair with the potential to lose substantial file data. This was partly mitigated in HFS+ by journalling, but as we’ve all experienced that can still leave damage to both file systems and data. APFS doesn’t use journalling, but has defences including copy-on-write which should at least ensure that the file system itself remains intact. That relies on changes to the file system being performed in order, thus that macOS controls the flushing of pending writes to disk.

Read more at eclecticlight.co

Exit mobile version