Posted Mar 12, 2009 14:03 UTC (Thu) by ricwheeler (subscriber, #4980)
Parent article: ext4 and data loss
I think that we are overstating the data integrity promises of ext3 to a degree, which makes the ext4 behaviour seem less desirable. No enterprise application I know of is built around the assumption that every 5 seconds or so you will probably survive a power outage.
Applications that needs to insure data integrity should take specific steps, including:
* use fsync() when you hit state that you would like to survive a crash
* when using rename, you need to fsync() both the source and target directories
* make sure that barriers are enabled if not using a battery backed storage device or disable the write cache on your disk
It is pretty trivial to get data loss in any file system if you misconfigure and use sloppy assumptions.
If you have a boat load of apps which fail, you can easily configure your box (write cache disabled, nodelalloc for ext4, etc) to take the safe (and slow!) path.