public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Daniel Drake <ddrake@brontes3d.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: e2fsck and human intervention
Date: Tue, 6 Mar 2007 10:40:24 +0800	[thread overview]
Message-ID: <20070306024024.GZ6662@schatzie.adilger.int> (raw)
In-Reply-To: <1173112017.6300.14.camel@systems03.mmm.com>

On Mar 05, 2007  11:26 -0500, Daniel Drake wrote:
> This usually happens during e2fsck's regular "check every X mounts"
> thing, as opposed to immediately after booting up after power loss, so
> to begin with it's not immediately obvious why there is a problem.

That's because the post-boot e2fsck will only check the superblock and
replay the journal.  It won't do a full check of the filesystem unless
the kernel detected some corruption and marked an error in the superblock.

That is the primary reason why the "check after N mounts/months" code
is in e2fsck, even though it annoys some people.

> It's of course understandable and inevitable that power loss will
> occasionally cause some file loss or corruption, and that's fine.

As Ted said, if e2fsck detects anything wrong then this IS corruption
of some kind.  It might indicate that your disks are writing with
cache enabled and losing some writes that had been reported to the
kernel as committed to disk.

> Are there any better approaches than something like the following?
> 
> 1. Run "e2fsck -p /"
> 
> 2. If bit 3 is set in exit code (i.e. preen functionality detected
> unexpected inconsistency) then run "e2fsck -y /"

This is no better than just running "e2fsck -y" in the first place,
just twice as slow.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

  parent reply	other threads:[~2007-03-06  2:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05 16:26 e2fsck and human intervention Daniel Drake
2007-03-05 16:48 ` Theodore Tso
2007-03-05 17:01   ` Daniel Drake
2007-03-05 17:42   ` Sev Binello
2007-03-06  2:40 ` Andreas Dilger [this message]
2007-03-06 14:27   ` Daniel Drake
2007-03-07  5:19     ` Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070306024024.GZ6662@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=ddrake@brontes3d.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox