linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: confusing behavior when supers mismatch
Date: Sun, 10 Mar 2019 21:20:50 -0600	[thread overview]
Message-ID: <CAJCQCtRVT9Fpy0Knj44m0BN80d-PidUfHPJ0d9VJkag7B-KXTQ@mail.gmail.com> (raw)
In-Reply-To: <cf8922ef-b7db-7779-c140-80090efc60d5@gmx.com>

On Sun, Mar 10, 2019 at 7:18 PM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
>
> On 2019/3/11 上午7:09, Chris Murphy wrote:
> > In the case where superblock 0 at 65536 is valid but stale (older than
> > the others):
>
> Then this means either the fs is fuzzed, or the FUA implementation of
> the disk is completely screwed up.

Fuzzed in this case by me.

(Backstory: On linux-raid@ list, user accidentally zero'd first 1MiB
of an mdadm array which contains Btrfs, but has a backup of this 1MiB.
So I was testing in advance the behavior of restoring this 1MiB
backup; but I'm guessing upon zero the working file system may have
changed as it's not unmount, and in fact probably very soon after
zeroing, wrote a good super replacement anyway. It seems the only
missing thing we need is LVM metadata, maybe.)


> So IMHO always use the primary superblock is the designed behavior.

OK interesting. So in what case are the backup supers used? Only by
`btrfs rescue super` or by explicit request, e.g. I notice even with
an erased primary super signature, a `btrfs check -S1 --repair` does
not cause the S0 super to be fixed up; and `btrfs rescue super` lacks
an -S flag, so fixing accidentally wiped Btrfs super requires manual
intervention.


-- 
Chris Murphy

  reply	other threads:[~2019-03-11  3:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 23:09 confusing behavior when supers mismatch Chris Murphy
2019-03-10 23:18 ` Chris Murphy
2019-03-11  1:17 ` Qu Wenruo
2019-03-11  3:20   ` Chris Murphy [this message]
2019-03-11  4:58     ` Qu Wenruo
2019-03-11  5:19       ` Chris Murphy
2019-03-11 12:26   ` Nikolay Borisov
2019-03-11 12:35     ` Qu Wenruo
2019-03-11 12:37       ` Nikolay Borisov
2019-03-11 13:27         ` Qu Wenruo
2019-03-11 14:38 ` Anand Jain

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=CAJCQCtRVT9Fpy0Knj44m0BN80d-PidUfHPJ0d9VJkag7B-KXTQ@mail.gmail.com \
    --to=lists@colorremedies.com \
    --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).