Janne Johansson wrote:
> Nick Guenther wrote:
> 
>>>>> So, as nicely summarized at
>>>>>
>> http://www.h-online.com/open/news/item/Possible-data-loss-in-Ext4-740467.html
>> ,
>>>>> ext4 is kind of broken. It won't honor fsync and, as a /feature/, will
>>>>> wait up to two minutes to write out data, leading to lots of files
>>>>> emptied to the great bitbucket in the sky if the machine goes down in
>>>>> that period.
>>> There is a very simple explanation for why things are so.
>>> Actual data file loss has never been what these things were coded for.
>>> filesystem *tree and meta-data*, ie. the structure of how things are
>>> knit together, is the main concern.  If you lose the filesystem tree
>>> structure, you've lost all your files, not just the newest ones.
>>> Therefore the goal is safe metadata handling.  The result is you can
>>> lose specific data in specific (newly written to) files, but the
>>> structure of the filesystem is consistant enough for fsck to not damage
>>> it.
> 
>> See, since it seems that BSD doesn't have this file-data consistency
>> guarantee, are Linus' worries about ext4's potential data loss just
>> being alarmist? It seems to me that the case described in
>> https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/45
>> is just as likely to happen on OpenBSD--if I run KDE or GNOME and mess
>> around with my settings then quickly murder the system the files will
>> be resurrected empty, right?
> 
> It seems like some posters in this thread somehow misses the fact that
> if you have outstanding writes and the box dies. Some of your data dies
> also. New or old data, something will be missing.
> 
> From the point your app does a write(), it gets buffered in the I/O
> handling, it gets buffered by the device driver for the card, it gets
> buffered in the card probably, it gets buffered on the on-disk memory
> cache and then it serially hits the platter one bit a a time until its
> all written. If you have data in this long pipe and the power goes, you
> will lose data, period.
> 
> OpenBSD has chosen to try harder to keep the metadata intact, and ext4
> doesn't try at all, for the love of speed. Still, you are only moving
> around the window of opportunity for fail, and sometimes making it
> larger or smaller, but it is always there.
> 
> The last comment above should really only read:
> "If I quickly murder my system, the files might be gone". Nothing else.
> 
> If you have writes going, data loss is a reality. Sometimes more,
> sometimes less, but its all games with statistics. If ext4 has a 50%
> chance of killing your files and FFS on obsd has 1%, you might still get
> to keep your KDE settings on either system or you may lose them all. It
> shouldn't be news to anyone that Linux always went for fast-and-insecure
> whereas the BSDs opted for slower-but-safer for the filesystems. Making
> a fuss about how insecure the penguins are this week feels like a waste
> of time to me.
> 
> If you care about your data, you have backups.
> 
> Regardless of if the probability is 1% or 50%, because for someone out
> there, the percentages will be against you.
> 

I know this is a bit off topic, but storage devices have battery's on
RAID cards for a reason. If you are worried about read/writes etc when a
system dies, there are measures you can take

Reply via email to