linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: "Tomáš Hrdina" <thomas.rkh@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Unable to mount degraded RAID5
Date: Wed, 6 Jul 2016 12:12:54 -0600	[thread overview]
Message-ID: <CAJCQCtSuVzykDn+Xk31dSjdgRVOhGxy77dAwuo2aTeAB7XY8hw@mail.gmail.com> (raw)
In-Reply-To: <3a554136-ba08-0b9d-7ef7-7a9d6c42f217@gmail.com>

On Wed, Jul 6, 2016 at 11:50 AM, Tomáš Hrdina <thomas.rkh@gmail.com> wrote:
> sudo mount -o ro /dev/sdc /shares
> mount: wrong fs type, bad option, bad superblock on /dev/sdc,
>        missing codepage or helper program, or other error
>
>        In some cases useful info is found in syslog - try
>        dmesg | tail or so.
>
>
> sudo mount -o ro,recovery /dev/sdc /shares
> mount: wrong fs type, bad option, bad superblock on /dev/sdc,
>        missing codepage or helper program, or other error
>
>        In some cases useful info is found in syslog - try
>        dmesg | tail or so.


[ 275.688919] BTRFS error (device sda): parent transid verify failed
on 7008533413888 wanted 70175 found 70132

Looks like the generation is too far back for backup roots.

Just for grins, now that all drives are present, what do you get for

# btrfs rescue super-recover -v /dev/sda

Next I suggest btrfs-image -c9 -t4 and optionally -s to sanitize file
names. And also btrfs-debug-tree (this time no -d) redirected to a
file. These two files can be big, about the size of the used amount of
metadata chunks. These go in the cloud at some point, reference them
in a bugzilla.kernel.org bug report by URL. Expect it to be months
before a dev looks at it.

So now what you want to try to do is use restore.
https://btrfs.wiki.kernel.org/index.php/Restore

You can use the information from btrfs-find-root to give restore a -t
value to try. For example:

>Found tree root at 6062830010368 gen 70182 level 1
>Well block 6062434418688(gen: 70181 level: 1) seems good, but
>generation/level doesn't match, want gen: 70182 level: 1
>Well block 6062497202176(gen: 69186 level: 0) seems good, but
>generation/level doesn't match, want gen: 70182 level: 1
>Well block 6062470332416(gen: 69186 level: 0) seems good, but
>generation/level doesn't match, want gen: 70182 level: 1


btrfs restore -t 6062830010368 -v -i /dev/sda <pathtowhereyouwantdatatogo>

If that fails totally you can try the next bytenr, for the -t value,
6062434418688. And then the next. Each value down is going backward in
time, so it implies some data loss.

This is not the end. It's just that it's the safest since no changes
to the fs have happened. If you set up some kind of overlay you can be
more aggressive like going right for btrfs check --repair and seeing
if it can fix things, but without the overlay it's possible to totally
break the fs such that even restore won't work.

Once you pretty much have everything important off the volume, you can
get more aggressive with trying to fix it. OR just blow it away and
start over. But I think it's valid to gather as much information about
the file system and try to fix it because the autopsy is the main way
to make Btrfs better.



-- 
Chris Murphy

  reply	other threads:[~2016-07-06 18:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 18:09 Unable to mount degraded RAID5 Tomáš Hrdina
2016-07-04 18:41 ` Chris Murphy
     [not found]   ` <95f58623-95a4-b5d2-fa3a-bfb957840a31@gmail.com>
2016-07-04 19:01     ` Chris Murphy
2016-07-04 19:11       ` Tomáš Hrdina
2016-07-04 20:43         ` Chris Murphy
2016-07-04 21:10           ` Tomáš Hrdina
2016-07-04 22:42             ` Chris Murphy
2016-07-04 22:59               ` Chris Murphy
2016-07-05  7:12               ` Tomáš Hrdina
2016-07-05  3:48           ` Andrei Borzenkov
2016-07-05 15:13             ` Chris Murphy
2016-07-05 18:40               ` Tomáš Hrdina
2016-07-05 23:19                 ` Chris Murphy
2016-07-06  8:07                   ` Tomáš Hrdina
2016-07-06 16:08                     ` Chris Murphy
2016-07-06 17:50                       ` Tomáš Hrdina
2016-07-06 18:12                         ` Chris Murphy [this message]
2016-07-09 17:30                           ` Tomáš Hrdina
2016-07-09 18:33                             ` Chris Murphy
2016-07-10  7:01                               ` Tomáš Hrdina
2016-07-10 20:08                                 ` Chris Murphy
2016-07-11 17:17                                   ` Tomáš Hrdina
2016-07-11 19:25                                     ` Chris Murphy
     [not found] <CAFDLS-CtnVDtD8d=Wtp0tVokKJ6pjptpX7MR862dThBJvSPC5g@mail.gmail.com>
2016-07-06 17:12 ` Fwd: " Gonzalo Gomez-Arrue Azpiazu
2016-07-06 18:19   ` Chris Murphy
2016-07-07 12:24     ` Gonzalo Gomez-Arrue Azpiazu

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=CAJCQCtSuVzykDn+Xk31dSjdgRVOhGxy77dAwuo2aTeAB7XY8hw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=thomas.rkh@gmail.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).