From: Eric Sandeen <sandeen@redhat.com>
To: Ming Lei <Ming.Lei@riverbed.com>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: ext4 corruption during unexpected power cycle in the middle of writing
Date: Wed, 06 Jun 2012 00:31:34 -0500 [thread overview]
Message-ID: <4FCEEB36.9010102@redhat.com> (raw)
In-Reply-To: <2CE44BD3DBCF9541909CCB42F11CA392825CBF@SFO1EXC-MBXP06.nbttech.com>
On 6/6/12 12:24 AM, Ming Lei wrote:
> I ran the power cycle test during the middle of file writing and after bootup, I ran force fsck and found two errors (If I run fsck -p -v I don't see the errors). From what I saw I think it is file system meta data corruption. Fsck can repair it but each time I ran the same test and I hit the same issue.
>
> I don't think it is relevant but want to point out that sda6 shares the same drive as another partition on sda(sda3) is used for the raid6 array for /var.
>
> The same issue was found whenever barrier is on or off, and the disk drive write cache is enabled or disabled. The test result shown below is when barrier is on and disk write cache is disabled.
>
> I use kernel version 2.6.32SL6 version. I also see the same issue on 2.6.9 based kernel on the same hardware with ext3 file system.
>
> My question is:
> 1) Is the issue caused from something unique in my box? Configuration error?
> 2) Is it possible my version of fsck reported false errors?
Sort of. You got:
> Free blocks count wrong (118366120, counted=76269471).
> Fix? yes
>
> Free inodes count wrong (30081013, counted=30081004).
> Fix? yes
Those are the superblock counters, which aren't journaled - only the bg counters are logged via the journal, IIRC.
They aren't false... they are just expected due to the design I'm afraid.
If you had mounted/unmounted/fsck'd you wouldn't have seen errors, because at mount time the superblock gets updated from all of the individual bg counters in ext4_fill_super:
/*
* The journal may have updated the bg summary counts, so we
* need to update the global counters.
*/
> 3) Is this a known issue? ? Is it a kernel bug?
yes. Not really. ;)
> 4) How do I find what's wrong?
I think this is by design, though maybe a little unfortunate in that it is unexpected to get fsck errors on a journaling filesystem after a crash...
I ran into this same thing when doing recovery testing for > 16T filesystems.
-Eric
next prev parent reply other threads:[~2012-06-06 5:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 5:24 ext4 corruption during unexpected power cycle in the middle of writing Ming Lei
2012-06-06 5:31 ` Eric Sandeen [this message]
2012-06-06 5:44 ` Ming Lei
2012-06-06 18:55 ` Ted Ts'o
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=4FCEEB36.9010102@redhat.com \
--to=sandeen@redhat.com \
--cc=Ming.Lei@riverbed.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;
as well as URLs for NNTP newsgroup(s).