NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Which file-system is good for power down?




On Jan,Monday 7 2008, at 12:35 AM, Christian Baer wrote:

On Sun, 6 Jan 2008 17:06:33 +0100 Adam Hamsik wrote:

How will ext3 corrupt my data after hard crash ?.

IIRC ext3 gets its performance the same way a ext2 did: by writing async.
Ok, the journal has been added.

AFAIK soft-dependiences keep filesystem in consistent state with
ordering metadata writes. softdeps keep ordered metadata(which were
not written to fs yet.) in memory. And therefore if you have hard
crash with heavy-io server you can loose more than with journaling fs.
Keep number of softdeps in-memory buffers small is not solution
because it slows your io then.

Anything in the memory that wasn't written to disk when the power fails is
lost. It doesn't matter what fs you are using.

The difference is that soft updates (softdeps) will save any data that
actually did make it to the disk prior to the power going down. In case of ext3 that is not necessarily the case. Especially if the load on the drive
is heavy and it doesn't support tagged command queuing. I could happen
that data is actually written to the disk but can't be found because the
meta data wasn't written in time.

This is not true metadata must be committed before system can write any data to fs(in ordered mode data are keeped in transactions and can be written to disk only when transaction is in commiting state). Journaling and softdeps are different techniques for keeping filesystem in consitent state after reboot, their task is not protect data.


The journal only speeds up the checking
of the filesystem and lowers the chance of it being completely broken.
It's not a lifeguard for any data.

Regards,
Chris

Regards

Adam.




Home | Main Index | Thread Index | Old Index