Re: Check journal is replayable ?

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

 



On Mon, 2002-12-02 at 17:10, John Vickers wrote:

> Is there a simple way, at a shell script level, of finding out whether an ext3 fs
> has a sane journal, other than mounting it or running a full fsck ?

Define a "sane journal"?

The journal just contains copies of disk blocks.  It's nothing more than
a list of "here's a copy of the new block number FOO of the
filesystem."  And the journal is *supposed* to contain gaps after an
unexpected reboot --- it's by looking for missing bits that we work out
just how much of the journal did get successfully written out to disk
when things crashed.

In other words, the journal is really really dumb, and there's next to
no validation you can sensibly do on its contents without invoking a lot
of filesystem layout knowledge (and at that point you're into full fsck
territory.)

> AFAICT, the usual way of handling ext3 filesystems seems to be to mark them with fs_passno=0,
> so they never get fscked from the init scripts - but the journal gets replayed, and a few things
> get checked at mount time.

No, you should give them a valid pass number to force fsck to run, but
when fsck sees an ext3 filesystem needing recovery, it skips the full
check and just does the recovery stage.

You still want the fsck to run because in case of a filesystem error
being detected at run time, the kernel can mark the partition as having
an error, and the subsequent fsck can pick that up and force a full fsck
to fix it.  That mechanism fails if you set the pass number to zero.

You can disable forced fscks while preserving that error-recovery
behaviour by leaving the passno intact but setting the fsck mount-count
and check-intervals to zero with tune2fs.

Cheers,
 Stephen



_______________________________________________

Ext3-users@redhat.com
https://listman.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux