linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Interpreting Output of "btrfs fi show"
Date: Sun, 29 Apr 2012 04:15:24 +0000 (UTC)	[thread overview]
Message-ID: <pan.2012.04.29.04.15.24@cox.net> (raw)
In-Reply-To: 8118972.tgkAvno4mK@bursa22

Hubert Kario posted on Sat, 28 Apr 2012 18:42:52 +0200 as excerpted:

> On Thursday 26 of April 2012 20:54:47 Duncan wrote:
>> Helmut Hullen posted on Thu, 26 Apr 2012 13:11:00 +0200 as excerpted:
>> > Hallo, Bart,
>> >> 
>> >> Well I think there is a btrfs superblock still present from the
>> >> full-disk filesystem. Due to the offset of the first partition from
>> >> the start of the disk, this superblock was not overwritten when you
>> >> created the filesystem inside the partition.
>> > 
>> > Sounds familiar ...
>> > 
>> > I now use to delete about the first 10 MByte of the target disk via
>> > "dd if=/dev/zero"
>> 
>> But /unlike/ reiserfs, which was only affected with the well warned as
>> don't-use-unless-you-have-to fsck --rebuild-tree option, it seems that
>> due to btrfs scan, etc, btrfs has its similar problem in more routine
>> operation.
> 
> I'd say that this kind of problem is basically impossible in btrfs
> because of FS UUID written all over the tree.

Very good point!  I had forgotten about that.

> What we see here, is a superblock that is written in *very* specific
> place on the partition, that just is aligned in place that makes the
> whole disk look like btrfs.

Yes.  That would be more analogous to the md/raid problem related to one 
of the 1.x metadata formats, where it's at the /end/ of the volume.  If 
that "volume" happens to correspond to the end of the physical disk as 
well, then it's not always clear whether the md with metadata of that 
version is the entire device or just a partition thereon.

> I don't think it's actually possible for btrfs to put a file with btrfs
> filesystem image in place where it could seem like the basic block
> device has btrfs /too/. It depends on whatever the metadata block is
> allocated before data block on disk. It /may/ be possible in mixed
> data-metadata allocation mode.
> Chris or Josef, can you confirm?

Makes sense.  I too would like confirmation on the mixed-mode case, tho, 
as when I setup with btrfs, I'll very likely be using mixed-mode for some 
of my smaller filesystems.  (I don't plan on using the sub-volumes for 
that, as a good part of the reason I'm doing it is robustness, not 
putting all my data "eggs" in the same filesystem "basket".  Keeping them 
in separate baskets means if one filesystem "basket" dies, I've lost only 
a relatively small subset of my data.)

> Still, a "zero-superblock" option would be useful for the btrfs tool.
> I'll see what I can do about this.

Yes, indeed.  Particularly since various bits of btrfs functionality 
depend on scanning for filesystems (presumably their superblocks), and 
output like that in the OP can be confusing indeed, as well as 
potentially dangerous in recovery situations, where the wrong one might 
be activated by accident.  (FWIW, there's an mdadm --zero-superblock 
option.  I should take note of this thread and be sure I use it when next 
I redo my layouts, probably when I switch some of them to btrfs instead, 
tho that's going to be a bit as I'm waiting for N-way-mirroring, aka 
proper raid1 mode, not the 2-way-only-mirroring that btrfs calls raid1 
mode currently.)

Thanks.

-- 
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:[~2012-04-29  4:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26  2:34 Interpreting Output of "btrfs fi show" Thomas Rohwer
2012-04-26  8:34 ` Bart Noordervliet
2012-04-26  9:06   ` Thomas Rohwer
2012-04-26 10:04     ` Bart Noordervliet
2012-04-26 10:14       ` Thomas Rohwer
2012-04-26 11:11       ` Helmut Hullen
2012-04-26 11:53         ` David Sterba
2012-04-26 13:59           ` Helmut Hullen
2012-04-26 20:54         ` Duncan
2012-04-28 16:42           ` Hubert Kario
2012-04-29  4:15             ` Duncan [this message]
2012-04-30 17:03               ` Hubert Kario
2012-04-29 18:34             ` Hugo Mills
2012-04-29  6:13       ` Martin Steigerwald
2012-04-30 17:10         ` Hubert Kario
2012-04-30 18:12           ` Mike Fleetwood

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.2012.04.29.04.15.24@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;
as well as URLs for NNTP newsgroup(s).