I had a home Nas running zfs on a unreliable power supply and I lost the contents of the Nas a few times before I disabled the write cache. Ext4 seems to tolerate this much better.
> I had a home Nas running zfs on a unreliable power supply and I lost the contents of the Nas a few times before I disabled the write cache. Ext4 seems to tolerate this much better.
Maybe it is because Ext4 by default "bypass"[1] write caches by default.
It doesn't tolerate power loss at all; it doesn't have any kind of facilities to do that, and write barriers will only work if the underlying storage supports it, otherwise ext4 will revert to no write barriers, so it's spotty at best, hit-and-miss.
There is no way to detect silent data corruption on any generation of an ext filesystem and if you lose power, you've not only lost data but it has most likely been silently corrupted as well. ext filesystems will be none the wiser to this. Same with XFS, UFS, or any other classic filesystem, but ext family of filesystems is particularly shoddy in that regard.
Write cache should always be disabled, even if one is running multimillion dollar storage arrays, no ifs, buts, or maybes. That goes without saying, it's the holy law of data integrity to any storage architect who understands the intricacies of storage systems.
I had a home Nas running zfs on a unreliable power supply and I lost the contents of the Nas a few times before I disabled the write cache. Ext4 seems to tolerate this much better.