linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Dressler <danieru.dressler@gmail.com>
To: Brendan Hide <brendan@swiftspirit.co.za>
Cc: "open list:BTRFS FILE SYSTEM" <linux-btrfs@vger.kernel.org>,
	bug-grub@gnu.org
Subject: Re: BTRFS messes up snapshot LV with origin
Date: Mon, 17 Nov 2014 16:35:48 +0900	[thread overview]
Message-ID: <CAGC3nLDFYQpc+VGF2K5HLLiNr6TgSoxO0ES9cS581dnvRLNkBg@mail.gmail.com> (raw)
In-Reply-To: <54699CC7.1050909@swiftspirit.co.za>

If a UUID is not unique enough how will adding a second UUID or
"unique drive identifier" help?

A UUID only serves any purpose when it is unique. Thus duplicate UUIDs
are themselves a failure state.

The solution should be to make it harder to get into this failure
state. Not to make all programs resilient against running under this
failure state. It isn't a btrfs bug that it requires Universal Unique
IDs to be universally unique.

Daniel

2014-11-17 15:59 GMT+09:00 Brendan Hide <brendan@swiftspirit.co.za>:
> cc'd bug-grub@gnu.org for FYI
>
> On 2014/11/17 03:42, Duncan wrote:
>>
>> MegaBrutal posted on Sun, 16 Nov 2014 22:35:26 +0100 as excerpted:
>>
>>> Hello guys,
>>>
>>> I think you'll like this...
>>> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1391429
>>
>> UUID is an initialism for "Universally Unique IDentifier".[1]
>>
>> If the UUID isn't unique, by definition, then, it can't be a UUID, and
>> that's a bug in whatever is making the non-unique would-be UUID that
>> isn't unique and thus cannot be a universally unique ID.  In this case
>> that would appear to be LVM.
>
> Perhaps the right question to ask is "Where should this bug be fixed?".
>
> TL;DR: This needs more thought and input from btrfs devs. To LVM, the bug is
> likely seen as being "out of scope". The "correct" fix probably lies in the
> ecosystem design, which requires co-operation from btrfs.
>
> Making a snapshot in LVM is a fundamental thing - and I feel LVM, in making
> its snapshot, is doing its job "exactly as expected".
>
> Additionally, there are other ways to get to a similar state without LVM:
> ddrescue backup, SAN snapshot, old "missing" disk re-introduced, etc.
>
> That leaves two places where this can be fixed: grub and btrfs
>
> Grub is already a little smart here - it avoids snapshots. But in this case
> it is relying on the UUID and only finding it in the snapshot. So possibly
> this is a bug in grub affecting the bug reporter specifically - but perhaps
> the bug is in btrfs where grub is relying on btrfs code.
>
> Yes, I'd rather use btrfs' snapshot mechanism - but this is often a choice
> that is left to the user/admin/distro. I don't think saying "LVM snapshots
> are incompatible with btrfs" is the right way to go either.
>
> That leaves two aspects of this issue which I view as two separate bugs:
> a) Btrfs cannot gracefully handle separate filesystems that have the same
> UUID. At all.
> b) Grub appears to pick the wrong filesystem when presented with two
> filesystems with the same UUID.
>
> I feel a) is a btrfs bug.
> I feel b) is a bug that is more about "ecosystem design" than grub being
> silly.
>
> I imagine a couple of aspects that could help fix a):
> - Utilise a "unique drive identifier" in the btrfs metadata (surely this
> exists already?). This way, any two filesystems will always have different
> drive identifiers *except* in cases like a ddrescue'd copy or a block-level
> snapshot. This will provide a sensible mechanism for "defined behaviour",
> preventing corruption - even if that "defined behaviour" is to simply give
> out lots of "PEBKAC" errors and panic.
> - Utilise a "drive list" to ensure that two unrelated filesystems with the
> same UUID cannot get "mixed up". Yes, the user/admin would likely be the
> culprit here (perhaps a VM rollout process that always gives out the same
> UUID in all its filesystems). Again, does btrfs not already have something
> like this built-in that we're simply not utilising fully?
>
> I'm not exactly sure of the "correct" way to fix b) except that I imagine it
> would be trivial to fix once a) is fixed.
>
> --
> __________
> Brendan Hide
> http://swiftspirit.co.za/
> http://www.webafrica.co.za/?AFF1E97
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-11-17  7:35 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16 21:35 BTRFS messes up snapshot LV with origin MegaBrutal
2014-11-17  1:42 ` Duncan
2014-11-17  6:59   ` Brendan Hide
2014-11-17  7:35     ` Daniel Dressler [this message]
2014-11-17  9:00       ` Brendan Hide
2014-11-17 19:04     ` Goffredo Baroncelli
     [not found]       ` <CAE8gLh=VubBbZdeKTAuWRjOxPF7C+ouUeeVvmGfT2ckYWGhQVA@mail.gmail.com>
2014-11-17 19:45         ` Fwd: " MegaBrutal
2014-11-17 20:32           ` Goffredo Baroncelli
2014-11-18  6:16           ` Chris Murphy
2014-11-18 15:42             ` Phillip Susi
2014-11-18 19:17               ` Chris Murphy
2014-11-18 20:17                 ` Phillip Susi
2014-11-19  2:54                   ` Chris Murphy
2014-11-19 15:20                     ` Phillip Susi
2014-11-19 18:35                       ` Chris Murphy
2014-11-19 19:23                         ` Phillip Susi
2014-11-21  4:28                       ` Zygo Blaxell
2014-11-21  6:22                         ` Duncan
2014-11-21 11:35                           ` Robert White
2014-11-21 11:54                             ` Duncan
2014-11-21 17:56                           ` Zygo Blaxell
2014-11-21 23:09                             ` Duncan
2014-11-21 18:23                           ` Chris Murphy
2014-11-21 22:49                             ` Duncan
2014-11-21 23:41                               ` Duncan
2014-11-21 23:51                                 ` Duncan
2014-11-22 17:34                         ` Goffredo Baroncelli
2014-11-23  0:19                           ` Zygo Blaxell
2014-11-25 16:34                             ` Goffredo Baroncelli
2014-11-25 20:29                               ` Zygo Blaxell
2014-11-25 21:59                                 ` Goffredo Baroncelli
2014-11-25 22:21                                   ` Zygo Blaxell
2014-11-25 22:47                                     ` Chris Murphy
     [not found]                                     ` <CAJCQCtQUM=viSoPtcJMcyKquYb1DLmEsqBi=p++uXPy63+r3Ow@mail.gmail.com>
     [not found]                                       ` <20141126021134.GR17380@hungrycats.org>
2014-11-26  4:48                                         ` Chris Murphy
2014-11-26 17:19                                     ` Goffredo Baroncelli
2014-11-27  4:15                                       ` Zygo Blaxell
2014-11-28 17:05                                         ` Goffredo Baroncelli
2014-11-29  1:25                                           ` Robert White
2014-11-29  7:35                                             ` Goffredo Baroncelli
2014-11-29  8:02                                               ` Robert White
2014-11-29  7:37                                             ` MegaBrutal
2014-11-29  4:59                                           ` Zygo Blaxell
2014-11-29  7:55                                             ` Robert White
2014-12-01 15:25                                               ` Zygo Blaxell
2014-11-26  3:22                                   ` Duncan
2014-11-26  5:11                                     ` Chris Murphy
2014-11-26 22:08                                     ` Robert White
2014-11-27  9:08                                       ` Duncan
2014-11-28  7:10                                         ` Chris Murphy
2014-11-29  7:29                                           ` Duncan
2014-11-29  8:20                                             ` Robert White
2014-11-29  9:41                                               ` Duncan
2014-11-29 16:33                                                 ` Robert White
2014-11-29 16:50                                               ` Robert White
2014-11-30  6:46                                                 ` Duncan
2014-11-29 21:15                                               ` Chris Murphy
2014-11-18 20:41               ` MegaBrutal
2014-11-19  1:29               ` Robert White
2014-11-19  3:37                 ` Duncan
2014-11-21  4:24       ` Zygo Blaxell
2014-11-18  6:21     ` Chris Murphy
2014-11-18 12:13       ` Duncan
2014-11-18 20:01       ` Goffredo Baroncelli
  -- strict thread matches above, loose matches on Subject: below --
2014-11-17  8:00 MegaBrutal

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=CAGC3nLDFYQpc+VGF2K5HLLiNr6TgSoxO0ES9cS581dnvRLNkBg@mail.gmail.com \
    --to=danieru.dressler@gmail.com \
    --cc=brendan@swiftspirit.co.za \
    --cc=bug-grub@gnu.org \
    --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).