linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Alexey Isaev <a.isaev@rqc.ru>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs becomes read-only
Date: Wed, 27 Jan 2021 00:38:00 -0700	[thread overview]
Message-ID: <CAJCQCtQFniOd53+3FFoOo4UM8CzY_vranrrHiWH86HugNvaOpw@mail.gmail.com> (raw)
In-Reply-To: <cf9189c0-614c-26e8-9d3e-8e18555c064f@rqc.ru>

On Wed, Jan 27, 2021 at 12:22 AM Alexey Isaev <a.isaev@rqc.ru> wrote:
>
> Hello!
>
> BTRFS volume becomes read-only with this messages in dmesg.
> What can i do to repair btrfs partition?
>
> [Jan25 08:18] BTRFS error (device sdg): parent transid verify failed on
> 52180048330752 wanted 132477 found 132432
> [  +0.007587] BTRFS error (device sdg): parent transid verify failed on
> 52180048330752 wanted 132477 found 132432
> [  +0.000132] BTRFS error (device sdg): qgroup scan failed with -5
>
> [Jan25 19:52] BTRFS error (device sdg): parent transid verify failed on
> 52180048330752 wanted 132477 found 132432
> [  +0.009783] BTRFS error (device sdg): parent transid verify failed on
> 52180048330752 wanted 132477 found 132432
> [  +0.000132] BTRFS: error (device sdg) in __btrfs_cow_block:1176:
> errno=-5 IO failure
> [  +0.000060] BTRFS info (device sdg): forced readonly
> [  +0.000004] BTRFS info (device sdg): failed to delete reference to
> ftrace.h, inode 2986197 parent 2989315
> [  +0.000002] BTRFS: error (device sdg) in __btrfs_unlink_inode:4220:
> errno=-5 IO failure
> [  +0.006071] BTRFS error (device sdg): pending csums is 430080

What kernel version? What drive make/model?

wanted 132477 found 132432 indicates the drive has lost ~45
transactions, that's not good and also weird. There's no crash or any
other errors? A complete dmesg might be more revealing. And also

smartctl -x /dev/sdg
btrfs check --readonly /dev/sdg

After that I suggest
https://btrfs.wiki.kernel.org/index.php/Restore

And try to get any important data out if it's not backed up. You can
try btrfs-find-root to get a listing of roots, most recent to oldest.
Start at the top, and plug that address in as 'btrfs restore -t' and
see if it'll pull anything out. You likely need -i and -v options as
well.

-- 
Chris Murphy

  reply	other threads:[~2021-01-27  7:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  7:08 btrfs becomes read-only Alexey Isaev
2021-01-27  7:38 ` Chris Murphy [this message]
2021-01-27  8:57   ` Alexey Isaev
2021-01-27 20:50     ` Chris Murphy
2021-01-27 13:05   ` Alexey Isaev
2021-01-27 20:54     ` Chris Murphy

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=CAJCQCtQFniOd53+3FFoOo4UM8CzY_vranrrHiWH86HugNvaOpw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=a.isaev@rqc.ru \
    --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 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).