Operating System - HP-UX
1753726 Members
4698 Online
108799 Solutions
New Discussion юеВ

given /dev/vg00 find /dev/rdsk/c0X

 
SOLVED
Go to solution
andi_1
Frequent Advisor

given /dev/vg00 find /dev/rdsk/c0X

Hi,

If I have the following information:
/dev/vg00, how can I find out disk that this vg belongs to?

Thank you!
6 REPLIES 6
D. Jackson_1
Honored Contributor
Solution

Re: given /dev/vg00 find /dev/rdsk/c0X

DO a vgdisplay -v /dev/vg00 and look at the bottom of the output it should give you the physical volumes..


HTH
harry d brown jr
Honored Contributor

Re: given /dev/vg00 find /dev/rdsk/c0X

Actually, the question should be stated "what disks belong to the VG". As noted by D. Jackson, vgdisplay will do it for ya.

To find out what VG a disk belongs to use, pvdisplay.

live free or die
harry
Live Free or Die
Darrell Allen
Honored Contributor

Re: given /dev/vg00 find /dev/rdsk/c0X

"vgdisplay -v /dev/vg00" will list the logical volumes and the disks (physical volumes) in that volume group.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Craig Rants
Honored Contributor

Re: given /dev/vg00 find /dev/rdsk/c0X

for i in `ls /dev/vg*`
do
vgdisplay -v $i | tail -20
done

Should be quick and easy

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
pap
Respected Contributor

Re: given /dev/vg00 find /dev/rdsk/c0X

Hi Leon,
This is very simple.

Just give the following command at the root prompt.

#vgdisplay -v /dev/vg00 | grep "PV Name"

This will list all the physical disks belong to the vg00.
The command in " " sign is case sensitive.

Thanks,
-Piyush.



"Winners don't do different things , they do things differently"
Christopher McCray_1
Honored Contributor

Re: given /dev/vg00 find /dev/rdsk/c0X

Hello,

Or as an alternative, run the following:


dmc19:/roothome# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t6d0
/dev/STK01
/dev/dsk/c5t0d0
/dev/STK02
/dev/dsk/c6t1d1
/dev/vg01
/dev/dsk/c2t6d0

Hope this helps
Chris

It wasn't me!!!!