linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: higuita <higuita@gmx.net>, Liu Bo <bo.li.liu@oracle.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs errors
Date: Sat, 17 Mar 2018 11:31:07 -0600	[thread overview]
Message-ID: <CAJCQCtSR8HB4E_9Xntazz=eQ5FokW63TyGb+=PzM8m4=i3x_jQ@mail.gmail.com> (raw)
In-Reply-To: <20180317013438.73e5bc35@couracado.motaleite.net>

On Fri, Mar 16, 2018 at 7:34 PM, higuita <higuita@gmx.net> wrote:
> On Tue, 13 Mar 2018 22:24:43 -0600, Chris Murphy
> <lists@colorremedies.com> wrote:

>> c. (optional) take a btrfs image before you do the repair because if
>> something blows up, at least that will help a dev figure out why btrfs
>> check blew up your file system.
>
>         done! i was expecting a image with at least my used space ( ~40GB),
> but i got a 1GB file. Is that normal?

Depends on 'btrfs fi us' output for metadata, and what compression
option used for btrfs-image. The resulting image output by btrfs-image
is only metadata. Also, if you want to sanitize file names, it's
recommended to use the -ss switch rather than just -s; I guess it's
easier for the devs.


>         After booting with a livecd and running a --repair with
> btrfs-progs v4.15.1, it didn't look it have done almost anything to the
> errors, running a new check still show mostly the same errors:

OK but we need the entire output from the repair attempt...

> # btrfs check --force /dev/vdisk/root
> WARNING: filesystem mounted, continuing because of --force

Maybe Qu or Liu can say otherwise. But in my opinion, btrfs check on
mounted file system is unreliable. If it's completely idle, no writes
the entire time the check is happening, it might be reliable. But it's
expected that btrfs check is an offline check. And btrfs scrub is an
online check.


OK so going back to your first email, I've noticed a couple things:

1.
The problem file system is vdisk/root which is an LVM LV made from two
PVs which are two SSDs. By default LVM uses linear concat so it should
be possible to figure out which drive is actually involved. It's
probably not important to know the mapping right now, but it does make
the troubleshooting more complicated.

2.
>From dmesg, one of the drives has a GPT problem and it makes me wonder
why. The backup GPT is at the end of the drive, so whatever stepped on
it probably did not affect anything in sdd2 which is one of the PVs
for vdisk/root. So it probably isn't related.

[    8.976491] Alternate GPT is invalid, using primary GPT.
[    8.976506]  sdd: sdd1 sdd2 sdd3 sdd4

3.
You got this message from btrfs scrub
ERROR: scrubbing /dev/mapper/vdisk-root failed for device id 1:
ret=-1, errno=5 (Input/output error)

Do you have the kernel message that appeared at the exact same time as this?


I suggest rebooting from live media and attaching output for the following:

btrfs check
btrfs check --mode=lowmem
mount the Btrfs volume and scrub it, and include all the kernel
messages specifically from mount through the end of scrub, including
any user space i/o errors. The problem could be anything in the
storage stack so we need to see device, device-mapper messages as well
as Btrfs.
umount and try btrfs check --repair but include all the output


The lowmem check is a different implementation and sometimes gives
different results.


-- 
Chris Murphy

  reply	other threads:[~2018-03-17 17:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  2:07 btrfs errors higuita
2018-03-14  4:24 ` Chris Murphy
2018-03-17  1:34   ` higuita
2018-03-17 17:31     ` Chris Murphy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-09 22:08 BTRFS Errors Michael Stickel
2021-05-15  2:24 ` Zygo Blaxell
     [not found] <632175948.36.1565689408284.JavaMail.gkos@xpska>
2019-08-13  9:48 ` btrfs errors Konstantin V. Gavrilenko
2019-08-13 10:55   ` Qu Wenruo
     [not found]     ` <744798339.29.1565703591504.JavaMail.gkos@xpska>
2019-08-13 14:01       ` Qu Wenruo
     [not found]         ` <1425294964.32.1565720950325.JavaMail.gkos@xpska>
2019-08-13 23:24           ` Qu Wenruo
2019-08-14  9:12             ` Konstantin V. Gavrilenko
     [not found] <AFB7E63B2FEE4449B3DBF47BC3AA36F085956971@server2k8.thomii.com>
2011-12-02 12:34 ` Mike Thomas
2011-12-02 12:38   ` Fajar A. Nugraha
2011-12-02 12:42     ` Mike Thomas

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='CAJCQCtSR8HB4E_9Xntazz=eQ5FokW63TyGb+=PzM8m4=i3x_jQ@mail.gmail.com' \
    --to=lists@colorremedies.com \
    --cc=bo.li.liu@oracle.com \
    --cc=higuita@gmx.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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).