util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Drake Wilson <drake@dasyatidae.net>
Cc: util-linux@vger.kernel.org, 770211@bugs.debian.org
Subject: Re: LUKS partition types, redux
Date: Mon, 24 Nov 2014 12:37:33 +0100	[thread overview]
Message-ID: <20141124113733.GC926@x2.net.home> (raw)
In-Reply-To: <546D0495.2030803@dasyatidae.net>

On Wed, Nov 19, 2014 at 02:59:01PM -0600, Drake Wilson wrote:
> 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.

 But it seems that the problem is what details partitioning tools
 provide to end-users rather than problem with data within disk
 labels. I don't see problem to add FS type column to fdisk(s) (it's
 already linked with libblkid).

> 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.

 You want to make a connection between partition type and partition
 format (FS, LUKS, LVM...). This idea is more than 30years old and it
 has been always fragile and introduced for poorly designed systems
 (kernels and boot loaders). 
 
 The current trend is to use partition type to define for what purpose
 we want to use the partition (for example "this is /home")
 independently on partition format. 
 
 For example systemd is able to generate on the fly mount table
 according to GPT partition types (so we have type for root and
 /home). All this is independent on FS/LUKS/etc. The same GUID is for
 XFS, ext4 ... this concept is not compatible with your idea.

 BTW, LUKS (and also XFS) is one of well designed on-disk formats
 where magic string is at the begin of the device, so all you need is
 one seek()+read().

 Anyway, I'd like to minimize number of situations when we depend
 on GPT/MBR partition types at all.

> (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.)

 This is about partitioning tools, not about on-disk disk label data.


    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  parent reply	other threads:[~2014-11-24 11:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 20:59 LUKS partition types, redux Drake Wilson
2014-11-19 22:24 ` 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 [this message]
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=20141124113733.GC926@x2.net.home \
    --to=kzak@redhat.com \
    --cc=770211@bugs.debian.org \
    --cc=drake@dasyatidae.net \
    --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).