Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: should btrfsck fix a bad superblock?
Date: Tue, 29 Dec 2015 02:28:19 +0000 (UTC)	[thread overview]
Message-ID: <pan$5afbb$4270f15d$d1ce1c42$cc039fab@cox.net> (raw)
In-Reply-To: CAJCQCtT78=kqXZVDAV-x0C1NW=7okBBM_+vM3+HAc5BtUArsiw@mail.gmail.com

Chris Murphy posted on Mon, 28 Dec 2015 17:10:14 -0700 as excerpted:

> Hi,
> 
> I (intentionally) used wipefs -a on a device with a btrfs. As expected
> btrfs check doesn't recognize the device as having a btrfs volume
> anymore.
> 
> Slightly surprising that it doesn't mention other intact supers are
> found.
> 
> Most surprising that options -s1 --repair doesn't fix it.
> 
> I thought maybe it's intentional, only with explicitly bad magic, and
> I'd get different results if it were zero'd. So I zero'd it and I get
> the same results. s0 superblock isn't repaired with --repair.
> 
> Bug?
> 
> Of course I can fix it with echo+dd.

Btrfs check's -s option simply lets you use a different superblock.  I 
don't believe check is designed to actually fix superblocks, tho I guess 
with --repair it fixes certain bad fields in them.

What you want to actually recover bad superblocks from good copies is 
btrfs rescue super-recover.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2015-12-29  2:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29  0:10 should btrfsck fix a bad superblock? Chris Murphy
2015-12-29  2:28 ` Duncan [this message]
2015-12-29  2:46   ` Chris Murphy
2015-12-29  2:58     ` Chris Murphy
2015-12-29 17:19   ` David Sterba

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='pan$5afbb$4270f15d$d1ce1c42$cc039fab@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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