From: Marc MERLIN <marc@merlins.org>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: David Sterba <dsterba@suse.com>, Hugo Mills <hugo@carfax.org.uk>,
linux-btrfs@vger.kernel.org
Subject: Re: when btrfs scrub reports errors and btrfs check --repair does not
Date: Fri, 11 Nov 2016 19:17:08 -0800 [thread overview]
Message-ID: <20161112031708.aylnevv657w2x3dg@merlins.org> (raw)
In-Reply-To: <f9757f37-ab2b-87d8-3f72-80dcc968f6e8@cn.fujitsu.com>
On Fri, Nov 11, 2016 at 11:55:21AM +0800, Qu Wenruo wrote:
> It seems to be orphan inodes.
> Btrfs doesn't remove all the contents of an inode at rm time.
> It just unlink the inode and put it into a state called orphan inodes.(Can't
> be referred from any directory).
BTRFS warning (device dm-6): checksum error at logical 269783928832 on dev /dev/mapper/crypt_bcache2, sector 529035272, root 17564, inode 1225897, offset 20480: path resolving failed with ret=-2
BTRFS warning (device dm-6): checksum error at logical 269783932928 on dev /dev/mapper/crypt_bcache2, sector 529035280, root 17564, inode 1225897, offset 24576: path resolving failed with ret=-2
Do you mean I should be using find /mnt/mnt -inum ?
Well, how about that, you're right:
gargamel:/mnt/mnt/DS2/backup# find /mnt/mnt -inum 1225897
/mnt/mnt/DS2/backup/debian64_rw.20160713_03:21:57/gandalfthegreat/20120409/home/merlin/public_html/mirrors/rwf/vfrcharts/x9y678z6.jpg
So basically the breakage in my filesystem is enough that the backlink
from the inode to the pathname is gone? That's not good :-/
> And then free their data extents in next several trans.
>
> Try to find these inodes using inode number in specified subvolume.
> If not found, then they are orphan inodes, nothing to worry.
> These wrong data extent will disappear soon or later.
>
> Or you can use "btrfs fi sync" to make sure orphan inodes are really removed
> from tree.
So, I ran btrfi fi sync /mnt/mnt, butit returned instantly.
scrub after that, still returns:
btrfs scrub start -Bd /mnt/mnt
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1793, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785628672 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1794, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269784580096 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1795, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785632768 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1796, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785104384 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1797, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269784584192 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1798, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785636864 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1799, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785108480 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1800, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269784588288 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1801, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269784055808 on dev /dev/mapper/crypt_bcache2
BTRFS error (device dm-6): bdev /dev/mapper/crypt_bcache2 errs: wr 0, rd 0, flush 0, corrupt 1802, gen 0
BTRFS error (device dm-6): unable to fixup (regular) error at logical 269785640960 on dev /dev/mapper/crypt_bcache2
What am I supposed to do about these, I'm not even clear where this
corruption is located and how to clear it.
I understand you're saying that this does not seem to affect any
remaining data, but if scrub is not clean, it can't even see what
file an inode is linked to, and that inode doesn't get cleaned 2 days
later, my filesystem is in a bad state that check --repair should fix,
is it not?
Yes, I can wipe it and start over, but I'm trying to use this as a
learning experience as well as seeing if the tools are working as they
should.
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
next prev parent reply other threads:[~2016-11-12 3:17 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-30 18:34 btrfs check --repair: ERROR: cannot read chunk root Marc MERLIN
2016-10-31 1:02 ` Qu Wenruo
2016-10-31 2:06 ` Marc MERLIN
2016-10-31 4:21 ` Marc MERLIN
2016-10-31 5:27 ` Qu Wenruo
2016-10-31 5:47 ` Marc MERLIN
2016-10-31 6:04 ` Qu Wenruo
2016-10-31 6:25 ` Marc MERLIN
2016-10-31 6:32 ` Qu Wenruo
2016-10-31 6:37 ` Marc MERLIN
2016-10-31 7:04 ` Qu Wenruo
2016-10-31 8:44 ` Hugo Mills
2016-10-31 15:04 ` Marc MERLIN
2016-11-01 3:48 ` Marc MERLIN
2016-11-01 4:13 ` Qu Wenruo
2016-11-01 4:21 ` Marc MERLIN
2016-11-04 8:01 ` Marc MERLIN
2016-11-04 9:00 ` Roman Mamedov
2016-11-04 17:59 ` Marc MERLIN
2016-11-07 1:11 ` Qu Wenruo
[not found] ` <87lgwwnnyf.fsf@notabene.neil.brown.name>
2016-11-07 1:20 ` clearing blocks wrongfully marked as bad if --update=no-bbl can't be used? Marc MERLIN
2016-11-07 1:39 ` Qu Wenruo
2016-11-07 4:18 ` Qu Wenruo
2016-11-07 5:36 ` btrfs support for filesystems >8TB on 32bit architectures Marc MERLIN
2016-11-07 6:16 ` Qu Wenruo
2016-11-07 14:55 ` Marc MERLIN
2016-11-08 0:35 ` Qu Wenruo
2016-11-08 0:39 ` Marc MERLIN
2016-11-08 0:43 ` Qu Wenruo
2016-11-08 1:06 ` Marc MERLIN
2016-11-08 1:17 ` Qu Wenruo
2016-11-08 15:24 ` Marc MERLIN
2016-11-09 1:50 ` Qu Wenruo
2016-11-09 2:05 ` Marc MERLIN
2016-11-11 3:48 ` Marc MERLIN
2016-11-11 3:55 ` Qu Wenruo
2016-11-12 3:17 ` Marc MERLIN [this message]
2016-11-13 15:06 ` when btrfs scrub reports errors and btrfs check --repair does not Marc MERLIN
2016-11-13 15:13 ` Roman Mamedov
2016-11-13 15:52 ` Marc MERLIN
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=20161112031708.aylnevv657w2x3dg@merlins.org \
--to=marc@merlins.org \
--cc=dsterba@suse.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
/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).