LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How to display which disks are part of volumegroup? (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-display-which-disks-are-part-of-volumegroup-4175576191/)

knuno 03-30-2016 04:14 AM

How to display which disks are part of volumegroup?
 
Let's say I have 3 physical disks sda, sdb and sdc. I combine these into a volume group called "my_group".
How can I find which disks are part of "my_group"? vgdisplay do not give me this information. Or the other way, how can I find which volume group, if any, sdc is part of?

Knut H.

syg00 03-30-2016 04:58 AM

Use the "lvs" comand - you can add the "devices" column to the normal output to get what you want. I don't know of a way to do a reverse lookup for /dev/sdc

Edit: oops - try vgs, and see if it has "devices" as well; I don't kave a LVM system to check at the moment.

knuno 03-30-2016 05:58 AM

Thank you. vgs -o devices gave what I was looking for. And pvs showed which group a physical disk is member of.

Knut H.


All times are GMT -5. The time now is 03:22 AM.