util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Drake Wilson <drake@dasyatidae.net>
To: util-linux@vger.kernel.org
Cc: 770211@bugs.debian.org
Subject: LUKS partition types, redux
Date: Wed, 19 Nov 2014 14:59:01 -0600	[thread overview]
Message-ID: <546D0495.2030803@dasyatidae.net> (raw)

Good day, folks of util-linux;

Summary: I would like to reopen the suggestion to add LUKS partition type codes
for MBR and for GPT to util-linux's fdisk.  In a previous discussion, it was
said that since Linux does not interpret partition types, there is no need for
this, but concrete data loss has now occurred as a result of a related bug in
other software combined with the lack of a user-visible LUKS type in a similar
partitioning program, and I believe that warrants re-examination of the situation.

Details:

I recently submitted Debian wishlist bug #770211 [1] suggesting to add e8 as the
MBR type code for LUKS to fdisk, per [2], mainly for consistency with my wishlist
item for gdisk at [3].  I was asked to ask about it here.  (I see now that fdisk
also handles GPT disklabels, which I wasn't previously aware of.)

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770211
[2] http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769631

I see now that there was a thread in January starting at [4] (message-ID
1390934933.15213.17.camel@heisenberg.scientia.net) about this, and the overall
result seemed to be that since Linux ignores partition type codes, there is
no reason to provide one for LUKS volumes.  The counterargument (which I agree
with) was roughly that since the type code slots exist in the first place, it
would be better to help the user semantically align them with the partition
contents, to prevent future issues from other type codes being used instead and
then misinterpreted by other systems.

[4] http://marc.info/?l=util-linux-ng&m=139093540719399&w=2

I would like to point out additional concrete evidence for the counterargument
now, in terms of harm minimization.  I previously tagged LUKS volumes on GPT with
a type code corresponding to the underlying volume type, as the closest thing I
could find (and a straw poll of some other Linux sysadmins I know says some of them
do the same).  I recently submitted Debian bug #768897 [5] in which partman-lvm,
a component of the Debian installer, overaggressively interprets the LVM type as a
normative request to make the partition contain an LVM PV, thus destroying all of
my existing LVM-on-LUKS volumes.  While I firmly believe that this is a bug in
partman-lvm and not in util-linux, had I used util-linux's fdisk to make the
partition tables, the presentation of a LUKS type code there would have
prevented significant data loss in this case.  (In my case, I used gdisk, but
I'm taking it up with them separately.)

[5] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768897

I would thus like to re-propose adding a LUKS type.  Alternatively, if a LUKS
type is still considered a bad idea, I would like to suggest allocating a GPT ID
analogous to the "da = Non-FS data" MBR type code, which would at least allow the
user to choose a fallback that has a known null semantic, rather than tagging their
volumes with some arbitrary ID that may be misinterpreted; that would help avert
analogous problems for future types as well.

(I also believe more philosophically that the user should be supported in the
possibility of integrating with other partition management systems that may wish
to detect LUKS and do something special with it, without requiring all other such
systems to incorporate a blkid-like system for checking in several places for the
"basic nature" of a volume.  I mention this only for the record, since the previous
thread suggests the util-linux maintainers don't agree with this.)

Thanks for any (polite) replies.

   ---> Drake Wilson

             reply	other threads:[~2014-11-19 20:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 20:59 Drake Wilson [this message]
2014-11-19 22:24 ` LUKS partition types, redux Dale R. Worley
2014-11-19 22:37   ` Drake Wilson
2014-11-20 21:33     ` Dale R. Worley
2014-11-21  7:47       ` Milan Broz
2014-11-21  7:54         ` LUKS partition types, redux (wandering into the weeds) Drake Wilson
2014-11-20 16:43   ` Bug#770211: LUKS partition types, redux Phillip Susi
2014-11-24  4:45     ` Drake Wilson
2014-11-24 14:33       ` Phillip Susi
2014-11-24 14:37         ` Drake Wilson
2014-11-24 14:45           ` Phillip Susi
2014-11-24 14:48           ` Drake Wilson
2014-11-24 14:58             ` Phillip Susi
2014-11-24 15:04               ` Drake Wilson
2014-11-24 15:09                 ` Phillip Susi
2014-11-24 16:10               ` Karel Zak
2014-11-24 16:27                 ` Phillip Susi
2014-11-25 15:18                 ` Dale R. Worley
2014-11-24 11:37 ` Karel Zak
2014-11-24 12:09   ` Drake Wilson
2014-11-24 14:42   ` Phillip Susi
2014-11-24 15:46     ` Karel Zak
2014-11-24 19:56       ` Bruce Dubbs
2014-11-25 11:26         ` Karel Zak
2014-11-25 15:36           ` Bruce Dubbs
2014-11-25 15:20       ` Dale R. Worley
2014-11-24 15:48     ` Dale R. Worley

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=546D0495.2030803@dasyatidae.net \
    --to=drake@dasyatidae.net \
    --cc=770211@bugs.debian.org \
    --cc=util-linux@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).