Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Maybe I'm missing something obvious but I do not see it listed in vgdisplay.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You can try this format:

# pvdisplay -C --separator '  |  ' -o pv_name,vg_name

You get something like what I think you're looking for:

  PV  |  VG
  /dev/sda2  |  vg_c6srv3
  /dev/sdb2  |  vg_c6srv3
  /dev/sdc2  |  vg_c6srv3
  /dev/sdd1  |  vg_ora112
  /dev/sdd2  |  
  /dev/sdd3  |  vg_ora112
  /dev/sdd5  |  vg_ora101
  /dev/sde1  |  vg_ora112
  /dev/sde2  |  vg_ora112
  /dev/sde3  |  
  /dev/sde4  |  vg_ora101
  /dev/sdf1  |  vg_ora112
  /dev/sdf2  |  
  /dev/sdf3  |  vg_ora112
  /dev/sdf5  |  vg_ora101

Hope that helps.

share|improve this answer

pvdisplay shows the VG each PV belongs to.

share|improve this answer
    
I've been doing pvs | grep volume_group but I thought I might be missing something better suited for this. –  Belmin Fernandez Nov 9 '10 at 19:07
    
And so does pvs, if one wants a more concise form. –  Gabriel Jan 7 at 18:43
vgdisplay -v <volume_group_name> 2> /dev/null | awk '/PV Name/ {print $3}'
share|improve this answer
1  
Can you elaborate? Just pasting a commandline input isn't always easy to understand. –  K.A Jan 7 at 4:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.