From: Chris Murphy <lists@colorremedies.com>
To: Robert White <rwhite@pobox.com>
Cc: Duncan <1i5t5.duncan@cox.net>, Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS messes up snapshot LV with origin
Date: Sat, 29 Nov 2014 14:15:11 -0700 [thread overview]
Message-ID: <CAJCQCtSDsHOSziCix7Rsy1oUH=dpbHVy4m4OHSV3tkS4e7wH6g@mail.gmail.com> (raw)
In-Reply-To: <547981BB.7030206@pobox.com>
On Sat, Nov 29, 2014 at 1:20 AM, Robert White <rwhite@pobox.com> wrote:
> On 11/28/2014 11:29 PM, Duncan wrote:
>>
>> Since I can't/won't run pretty much anything proprietary, there's little
>> chance of it being taken as anything but Linux, here. (Tho I actually
>> use (c)gdisk for partitioning here and it appears to use a different GUID.
>> (0700 in its short form which AFAIK is gdisk specific, for MS basic data,
>> while it uses 8300 for general Linux filesystems. I could look up the
>> long form GUIDs, but meh...)
>
>
> Partition type codes (e.g. 0700, 8300, EF00, etc) have _nothing_ to do with
> UUIDs. They are type codes. They aren't "short form" of anything else at
> all. In fact 0700 is the _long_ _form_ of the original code of "7", but in
> big-endian order now that it went from one byte to two.
No that's not correct. These four digit type codes are a user facing
friendly type code, the actual on-disk "partitiontype GUID" is a UUID
in that at the time of creation that UUID followed RFC 4122 so it was
unique: no one else was using the UUID. That UUID in the context of a
partitiontype GUID is intended to describe the purpose of that
partition: what OS, what file system, where it should mount or be used
for, etc. This is elaborately detailed in the GPT (GUID partition
table) portion of the UEFI specification. A 120 bit type code is
rather difficult for humans to remember and interact with, hence gdisk
and recently fdisk now use a four digit type code as a front end for
the partitiontypeGUID. The selection of four digits was to account for
the fact there are many many many more type codes now possible,
essentially unlimited.
This is a case where UUID are reused effectively.
> Microsoft started using pre-assigned UUIDs as "classes", e.g. type codes
> they could cram into their various registry files. If you actually read the
> registry you'll find a lot of places where "rational word" is defined as
> {some_uuid_here} and then eslwere {some_uuid_here} has a bunch of data items
> attached to it.
>
> So gpartd didn;t "reuse" microsoft UUIDs.
GNU parted absolutely re-used partitiontypeGUID
EBD0A0A2-B9E5-4433-87C0-68B6B72699C for Linux, by default. This you
know as gdisk (and friends) type code 0700. It's the same thing as
using type code 07 on an MBR partitioned disk instead of 83. It's
ridiculous that this happened considering we had distinction on MBR
with limited type code availability, and on GPT with unlimited type
codes the decision was to use an already existing type code,
EBD0A0A2-B9E5-4433-87C0-68B6B72699C.
http://www.rodsbooks.com/linux-fs-code/
The Linux partitiontype GUID is now
0FC63DAF-8483-4772-8E79-3D69D8477DE4. And actually some others have
been created also for encryption, RAID, LVM, swap, and a pile of GUIDs
from the 'discoverable partitions spec' hosted at freedesktop.org for
autodiscovery by systemd. Only very recent versions of parted supports
code 0FC63DAF-8483-4772-8E79-3D69D8477DE4.
> All this stuff has historical reasons. GNU/Linux attempts to be an
> egalitarian actor so it adapts to whatever you do.
With respect to this particular reuse of a Windows type code, it did a
total face plant on adaptation. The very decision to reuse that GUID
was a huge, weird mistake that we'll live with for years to come. Data
loss will result from it. And then it was made worse, upon recognition
that the conflict was probably not a good idea, to undermine patching
GNU parted in a timely manner. The patch to fix the problem, from the
gdisk author, sat around for two years before parted upstream merged
it. There really isn't good diplomatic language to use for this. Some
people flat out dropped the ball, and just didn't give a crap.
--
Chris Murphy
next prev parent reply other threads:[~2014-11-29 21:15 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
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 [this message]
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='CAJCQCtSDsHOSziCix7Rsy1oUH=dpbHVy4m4OHSV3tkS4e7wH6g@mail.gmail.com' \
--to=lists@colorremedies.com \
--cc=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=rwhite@pobox.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).