linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID
Date: Wed, 3 Nov 2021 15:15:32 -0500	[thread overview]
Message-ID: <20211103201532.GB5773@redhat.com> (raw)
In-Reply-To: <CAJCQCtRCEtGmsVQt0ug4c6PxGXkwhHjtrppNPSxa0StYs08mQA@mail.gmail.com>

On Wed, Nov 03, 2021 at 01:44:33PM -0400, Chris Murphy wrote:
> Hi,
> 
> I'm wondering to what degree the current LVM metadata format(s) can
> support additional or even arbitrary metadata.
> 
> The UEFI spec defines the GPT, and GPT defines a "partition type GUID"
> for each partition to define it's usage/purpose, in rather open ended
> fashion. I'm wondering about an equivalent for this with LVM, whether
> it's useful and how difficult it would be to implement. This is all
> very hypothetical right now, so a high level discussion is preferred.
> 
> The starting point is the Discoverable Partitions Spec:
> http://systemd.io/DISCOVERABLE_PARTITIONS/
> 
> Where GPT partition type codes are used to discover file systems, and
> their intended use without having to explicitly place them into
> /etc/fstab for startup time discovery and mounting. But LVM doesn't
> have an equivalent for exposing such a capability, because it implies
> many volumes within the larger pool and also the pool might comprise
> many devices.

I'd been curious about this since reading that page.  It would be nice if
it provided a way to better integrate lvm activation with the broader
system.

It seems like adding GPT info to disks, plus using predefined LV names, is
an alternative to setting rd.lvm.lv on the command line.  i.e. the OS will
activate a predefined root LV name from disks that are flagged (using GPT)
to be used for the purpose of the root LV.  Is that the idea?

In terms of lvm metadata, the set of disks used by the root LV is kept in
the lvm metadata, and that info would need to be kept in sync with the GPT
info on those same disks.  e.g. the lvm metadata says LV /dev/rootvg/root
uses sda and sdb, so the GPT info on sda and sdb also needs to reflect
that they are used for a root LV.  When the disks in the root LV change,
e.g. lvextend, then GPT info would also need updating.  I suppose this
just requires some integration between tools (unless the user is supposed
to be responsible for keeping things in sync.)

A similar kind of integration between lvm and dracut would let us improve
lvm activation in the initramfs.  There's not an obviously clean way to
update the initramfs from lvextend, so it's not been done.

I'll wait with other questions until I know if I've understood the basic
idea.

Dave

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


      parent reply	other threads:[~2021-11-03 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 17:44 Chris Murphy
2021-11-03 18:21 ` Roger Heflin
2021-11-03 20:15 ` David Teigland [this message]

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=20211103201532.GB5773@redhat.com \
    --to=teigland@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=lists@colorremedies.com \
    --subject='Re: [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID' \
    /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

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