On Thu, Sep 1, 2016 at 2:09 PM, Volker Armin Hemmann
<[email protected]> wrote:
>
> a common misconception. But not true at all. Google a bit.

Feel free to enlighten us.  My understanding is that data=journal
means that all data gets written first to the journal.  Completed
writes will make it to the main filesystem after a crash, and
incomplete writes will of course be rolled back, which is what you
want.

But simply disagreeing and saying to search Google is fairly useless,
since you can find all kinds of junk on Google.  You can't even
guarantee that the same search terms will lead to the same results for
two different people.

And FWIW, this is a topic that Linus and the ext3 authors have
disagreed with at points (not this specific question, but rather what
the most appropriate defaults are).  So, it isn't like there isn't
room for disagreement on best practice, or that any two people with
knowledge of the issues are guaranteed to agree.

>>
>> Now, I can still think of ways you can lose data in data=journal mode:
>>
>> * You mounted the filesystem with barrier=0 or with nobarrier; this can 
>> result
>
> not needed.

Well, duh.  He is telling people NOT to do this, because this is how
you can LOSE data.


>>
>> * Your application didn't flush its writes to disk when it should have.
>
> not needed either.

That very much depends on the application.  If you need to ensure that
transactions are in-sync with remote hosts (such as in a database) it
is absolutely critical to flush writes.

Applications shouldn't just flush on every write or close, because
that causes needless disk thrashing.  Yes, data will be lost if users
have write caching enabled, and users who would prefer a slow system
over one that loses more data when the power goes out should disable
caching or buy a UPS.

>
> nope.

Care to actually offer anything constructive?  His advice was
reasonably well-founded, even if I personally wouldn't do everything
exactly as he prefers to do so.

-- 
Rich

Reply via email to