linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID
@ 2021-11-03 17:44 Chris Murphy
  2021-11-03 18:21 ` Roger Heflin
  2021-11-03 20:15 ` David Teigland
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Murphy @ 2021-11-03 17:44 UTC (permalink / raw)
  To: LVM general discussion and development

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.

The same problem exists for Btrfs subvolumes, and ZFS datasets.

What might be possible and what is definitely not possible, is what
I'm interested in understanding for now.

Thanks,

-- 
Chris Murphy

_______________________________________________
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/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID
  2021-11-03 17:44 [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID Chris Murphy
@ 2021-11-03 18:21 ` Roger Heflin
  2021-11-03 20:15 ` David Teigland
  1 sibling, 0 replies; 3+ messages in thread
From: Roger Heflin @ 2021-11-03 18:21 UTC (permalink / raw)
  To: LVM general discussion and development

You have some basic problems.

#1 with shared lvm you would need a way to tell where it should go, so
you would have to have a mount_hostname type data in logical_volumes
sections.

#2 you would also need a mount_point entry, and a mount_opts entry.

And then at the end you are basically moving fstab into the
logicial_volume headers and that is not that useful overall because it
does not simplify anything for the most part, and probably actually
complicates things as the hostname change would get tricky, and/or
mountpoint changes would require lvm commands (harder than editing
fstab).

So long as the lv's are named reasonably then someone who knows they
are doing can mount up/recreate fstab with the lv in the right place
(say var_log_abrt would mount on /var/log/abrt).

I am not sure this simplifies anything nor improves anything except in
the case of a lost fstab, but naming the lv's verbosely at least makes
that easier.

On Wed, Nov 3, 2021 at 12:45 PM Chris Murphy <lists@colorremedies.com> 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.
>
> The same problem exists for Btrfs subvolumes, and ZFS datasets.
>
> What might be possible and what is definitely not possible, is what
> I'm interested in understanding for now.
>
> Thanks,
>
> --
> Chris Murphy
>
> _______________________________________________
> 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/
>

_______________________________________________
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/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID
  2021-11-03 17:44 [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID Chris Murphy
  2021-11-03 18:21 ` Roger Heflin
@ 2021-11-03 20:15 ` David Teigland
  1 sibling, 0 replies; 3+ messages in thread
From: David Teigland @ 2021-11-03 20:15 UTC (permalink / raw)
  To: Chris Murphy; +Cc: LVM general discussion and development

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/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-03 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 17:44 [linux-lvm] logical volume usage type code, equivalent to GPT partition type GUID Chris Murphy
2021-11-03 18:21 ` Roger Heflin
2021-11-03 20:15 ` David Teigland

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