You know how "fdisk -l" lists drive partition tables and shows the partition id/types for each partition?
Is there a similar way to get the partition id for LVM logical volumes?
EDIT: I'm aware of "lvs", which is mostly what I'm looking for (it gives me the list of logical volumes, kind of like "fdisk -l"… except it would also be useful to know what the partition types of the logical volumes (which I like to think of as "virtual partitions") are. That info is what "fdisk -l" lists on the last two columns on the right. (Such as "8e" for a physical LVM partition, or "83" for Linux ext, etc.).
The tool I'm looking for may not be part of LVM; maybe just some other utility that can print partition ids/types given a partition?
Best Answer
The partition ID for Linux LVM is 8e, reported by fdisk.
LVM is an abstraction layer on top of the storage device to make it easier for you to manage it. I'm not sure what information beyond what fdisk provides you want, because the partition ID for LVM is displayed. However, for additional information about LVM logical volumes, you can use 'lvscan', 'lvs' and 'lvdisplay'.
Similarly, you can learn information about the volume group itself with 'vgscan', 'vgs' and 'vgdisplay'.