[rfc] use ext3 instead of ext2

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Jul 15 15:34:54 PDT 2004


Matthew Burgess wrote:
> On Thu, 15 Jul 2004 15:18:58 -0600 (MDT) "Nathan Coulson"
> <conathan at conet.dyndns.org> wrote:
> 
>> I am not entirely sure about this, but this would mean we do not
>> fsck / on bootup, right?
> 
> That's my understanding too.  With a journalled FS there is no need
> to fsck the drive _at all_ as everything is journalled.  I _think_
> that the drive_needs_ to be mounted rw on bootup in order for the
> journalling replay to work in the case of an unclean shutdown, but
> I'm not entirely sure of that, so any confirmation would be
> appreciated.

ext3 does not need to be mounted rw on bootup to replay the journal.  If
it's mounted readonly, then you get a kernel log message about "write
access will be enabled while the journal is replayed" if the journal
needs to be replayed, but it is successfully replayed.  I am not sure
whether the write access that's enabled is only for the journal replay
code, though, or if there happened to be a udev event, whether we'd get
a spurious entry in the real /dev (but this is less of a problem than
mounting it rw all the time).

While there may not be a *need* to fsck the FS, it definitely doesn't
*hurt* anything to do it.  With ext3, fsck merely replays the journal if
the FS state is not "clean", instead of going through the whole long
ext2 fsck process.  (Yes, there is code in the kernel to replay the
journal, but IMHO it makes more sense to do the non-root FSes from
userspace.  That's probably not really important, though.)

That is, unless you pass -f to fsck -- in that case, it will do a full
fsck, ext2 style.  This used to be useful for me (even up to like 2.4.18
or so) because whenever it would run (I have it run every 90 days or 90
mounts, whichever comes first), it would find a couple of minor issues
with the FS.  Nothing that it couldn't fix, and nothing that put data in
jeopardy, but stuff that the journal should have prevented from
happening.  This seems to have disappeared, though IMHO anyway it's
still a good idea to do a fsck -f once in a great while just to be sure.



More information about the lfs-dev mailing list