Linux – Is data=journal on a separate device on Ext4 as good as using a RAID controller with battery backed cache for file system consistency

ext4linuxraidstorage

It seems to me that data=journal prevents file system inconsistency in the case of power failure. Using it with a dedicated journal device mitigates the performance penalty of writing the data twice. A power outage would still lose the data that is currently being written to the journal, but the file system on disk would always be consistent.

If that amount of loss is acceptable, is a RAID controller with battery backed cache really worthwhile?

Best Answer

A battery backed cache does more than just keep your filesystem consistent in the event of a power-failure. The cache itself actually performs read caching, and to some extent write-caching (mostly just re-ordering the writes for better write performance). Having a cache on your RAID controller can be a significant speedup for performance. Having a persistent cache of some kind (be it battery-backed, or the newer flash-backed caches) just makes sure that uncommitted writes don't get lost when things go kablooie.