Re: logical volume usage type code, equivalent to GPT partition type GUID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux