[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: fsck journal replay times (was Re: Is this list active?)


On Thu, Jul 12, 2001 at 09:48:28AM -0400, Charlie Woloszynski wrote:
> I am a bit concerned here.  We are looking to use ext3 to protect our fs from
> accidental power outages (boxes that we don't have much control over).  If I
> crash, will I have do a lot of fsck work, or just have the journal replayed
> (which I thought was automatic)?

ext3 doesn't need a full fsck after a crash, just a journal replay.
The replay can be done either by e2fsck of by the kernel when it
mounts the filesystem -- the same code is used in each case.

The reason we run e2fsck on ext3 filesystems is twofold --- first to
get all of the journal replaying done early on in boot, and secondly
to detect any errors on the filesystem which might need a full fsck to
be forced.  If ext2 or ext3 detect internal inconsistencies with the
data on disk (which might be due to memory or disk data corruption,
for example), then they set an error bit in the superblock and fsck
will force a full disk check when it sees that bit.

In the normal running of things, though, assuming there are no known
on-disk errors, e2fsck will just do a quick journal recovery and will
return.  You still run fsck on all filesystems, but the fsck returns
immediately after the recovery is done.

One last point --- ext2 has a way of forcing a fsck every so often,
either when the number of mounts or the elapsed time since the last
fsck is exceeded.  I'm looking for comments about whether those
intervals ought to be set to zero (disabling the forced-fscks) for
ext3 or not.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]