Hacker News new | past | comments | ask | show | jobs | submit login

As long as you disable the disk write cache.

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.




> As long as you disable the disk write cache.

> 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.

[1]: Look at barriers in Ext4 documentation: http://man7.org/linux/man-pages/man5/ext4.5.html


Thank you.

I wondered why ext4 tolerate sudden power loss much better.


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.

However, it has nothing to do with ZFS per se.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: