From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>,
Duncan <1i5t5.duncan@cox.net>, <linux-btrfs@vger.kernel.org>
Subject: Re: shall distros run btrfsck on boot?
Date: Tue, 24 Nov 2015 13:33:11 +0800 [thread overview]
Message-ID: <5653F697.7060601@cn.fujitsu.com> (raw)
In-Reply-To: <1448340211.14125.44.camel@scientia.net>
Christoph Anton Mitterer wrote on 2015/11/24 05:43 +0100:
> On Tue, 2015-11-24 at 04:35 +0000, Duncan wrote:
>> I'm a list regular and btrfs user, not a dev, but all the indications
>
>> continue to point to _not_ running it automatically at boot, nobody
>> even
>> _suggesting_ otherwise.
> Sure, I just asked because maybe that would have just been an
> anachronism from the days btrfsck was much more alpha.
>
>
>> The btrfs kernel code itself detects and often
>> corrects many problems, and btrfs check is simply not recommended for
>> automatic at-boot scheduling -- if the kernel code can't fix it
>> without
>> intervention, then the problem is too serious to be fixed without
>> intervention by some scheduled btrfs check run, as well.
> I once had an issue with a btrfs, where the kernel didn't show anything
> but btrfsck did...(not the one Qu's currently looking into).
> And I though the same is basically the case for other filesystems like
> ext.
>
>
>> In fact, take a look at the shipped fsck.btrfs shell-script, based
>> upon
>> the xfs one. As both the code and the comments suggest, it's
>> specifically designed to simply return success
> Sure, but that could have simply been forgotten to update...
>
>
> Thanks for the update on the status in that matter :)
> Cheers,
> Chris.
>
Another point of never running btrfsck at boot time is, it's super
SLOOOOOOOOOOOOOOOOOOOW!
And you should have experienced it during the false alert investigation. :)
It's SLOOOOOOOOOOOOOOOOOOW because it will need to iterate all the
metadata of filesystems to make sure every thing devs can think about is OK.
Unlike traditional filesystem (maybe only ext*), it has some dirty flag
in superblock or things like that to indicate a filesystem needs extra
check, and e2fsck will only do comprehensive check if the filesystem is
dirty.
That's why e2fsck can be run at boot time, as most of time, it just
finds the fs is clean and no extra check.
But btrfs doesn't use the old-fashion method, it uses COW to protect
metadata. So btrfsck is only designed to do comprehensive check and it's
very SLOOOOOOOOOOOOW (not to mention sometimes it's buggy and too
sensitive to give false alert).
Thanks,
Qu
--
This message has been scanned for viruses and
dangerous content by FCNIC, and is
believed to be clean.
next prev parent reply other threads:[~2015-11-24 5:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 4:02 shall distros run btrfsck on boot? Christoph Anton Mitterer
2015-11-24 4:31 ` Wang Shilong
2015-11-24 4:35 ` Duncan
2015-11-24 4:40 ` Eric Sandeen
2015-11-24 4:43 ` Christoph Anton Mitterer
2015-11-24 5:33 ` Qu Wenruo [this message]
2015-11-24 6:46 ` Duncan
2015-11-24 6:56 ` Duncan
2015-11-24 17:14 ` Eric Sandeen
2015-11-24 17:23 ` Christoph Anton Mitterer
2015-11-24 20:38 ` Austin S Hemmelgarn
2015-11-24 22:26 ` Eric Sandeen
2015-11-24 22:33 ` Hugo Mills
2015-11-24 23:01 ` Christoph Anton Mitterer
2015-11-24 23:06 ` Hugo Mills
2015-11-25 1:59 ` shall distros run btrfsck on boot?(Off topic, btrfs per-inode tree idea) Qu Wenruo
2015-11-25 12:32 ` shall distros run btrfsck on boot? Austin S Hemmelgarn
2015-11-25 15:26 ` Martin Steigerwald
2015-11-28 16:52 ` Jeff Mahoney
2015-11-30 1:59 ` Qu Wenruo
2015-11-30 19:27 ` Jeff Mahoney
2015-11-30 15:06 ` Austin S Hemmelgarn
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=5653F697.7060601@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=1i5t5.duncan@cox.net \
--cc=calestyo@scientia.net \
--cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.