linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Tom Vincent <tom@tlvince.com>, linux-btrfs@vger.kernel.org
Subject: Re: btrfs fails to mount after power outage
Date: Tue, 17 Apr 2018 08:31:54 +0800	[thread overview]
Message-ID: <1bd207c8-f1f9-125f-df2b-d77a6595bbd6@gmx.com> (raw)
In-Reply-To: <CAG4vCrfCb=VUQe8rpMebeUCHbqwrXviBmOYpekRbFMRL-xJVKA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]



On 2018年04月17日 00:07, Tom Vincent wrote:
> On 12 April 2018 at 00:25, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>> I'm curious about what's the underlying disk?
> 
> It's an Samsung PM951 NVMe SSD.
> 
>> Is it plain physical device? Or have other layers like bcache/lvm?
> 
> btrfs on LUKS
> 
>>> btrfs check
>> Full output please.
> 
> https://gist.githubusercontent.com/tlvince/acf51b37622c216e1c33cdc3dfbd321f/raw/d0237948bbffacd4bb8d53fdfa5f23391416c1e2/btrfs-check.txt

Unfortunately, not only extent tree, but also fs trees got corrupted:
root 259 inode 19916 errors 2000, link count wrong
	unresolved ref dir 16196710 index 2 namelen 12 name foo.gpg filetype 0
errors 3, no dir item, no dir index

Such output along other error messages means at least one tree block of
your fs trees get corrupted.

And it seems that all corrupted tree blocks belongs to subvolume 259.

>> For transid error, btrfs check --repair can fix it, but only do it when
>> that's the only problem.
> 
> I ran this (for ~12+ hours) to no avail; it appears to have been
> looping around "Btree for root 259 is fixed". I grew impatient and
> SIGINT-ed, which unsurprisingly toasted the file system once and for
> all (I rebuilt from backups at that point).

check --repair won't help much in this case.
So btrfs-restore would be your last chance to salvage data.

> 
> Full output:
> 
> https://gist.githubusercontent.com/tlvince/8060c19526aa011b0baff2b12e3873fd/raw/ecc43bd9dc7b352e490aa0bf0deac368af04e117/btrfs-check-repair.txt
> 
> Note, the system was fine for a few days after zero-log (before check
> --repair), but then hit the same transid error at boot.

Your filesystem is already *CORRUPTED*, so whatever happens is not a
surprise.

Only a filesystem which passes "btrfs check" without any problems could
be ensured to run for a long time.

Thanks,
Qu

> 
> On 13 April 2018 at 06:46, Duncan <1i5t5.duncan@cox.net> wrote:
>> What mount options?  In particular, is the discard option used (and of
>> course I'm assuming nothing as insane as nobarrier)?
> 
> noatime,compress=lzo
> 
> ... as well as some defaults: rw,noatime,compress=lzo,ssd,space_cache
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2018-04-17  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 15:33 btrfs fails to mount after power outage Tom Vincent
2018-04-11 23:25 ` Qu Wenruo
2018-04-13  5:46   ` Duncan
2018-04-16 16:07   ` Tom Vincent
2018-04-17  0:31     ` Qu Wenruo [this message]

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=1bd207c8-f1f9-125f-df2b-d77a6595bbd6@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tom@tlvince.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).