Operating System - HP-UX
1833779 Members
1949 Online
110063 Solutions
New Discussion

Which VG and LV are in the LUN

 
SOLVED
Go to solution
yc_2
Regular Advisor

Which VG and LV are in the LUN

Hi,

How to know which VG and LV are in the LUN.

System: N-class
OS: HPUX 11.00
AutoRaid storage system.


Rgds,
YC
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Which VG and LV are in the LUN

Hi,

The easist way is to do 'strings /etc/lvmtab'.
That will list each volume group followed by the devices which comprise it. Note that on an AutoRAID, each LUN is essentially over all the disks in the array. You can't point to a disk and say it is LUN2. The strings command will show which LUN's make up each volume group.


Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Which VG and LV are in the LUN

Ooops ... I missed part of your question.

To display the logical volumes that make up a volume group do 'vgdisplay -v /dev/vg01'.

By the way, the devices will be displayed something like this:

/dev/dsk/c2t1d4 controller 2, scsi target or id 1, LUN 4.
Clay
If it ain't broke, I can fix that.
Denver Osborn
Honored Contributor

Re: Which VG and LV are in the LUN

Use pvdisplay.

# pvdisplay -v /dev/dsk/cXtXdX

The output of PV Display will show you the "VG Name" and the lvols it contains under the "Distribution of physical volume" section.

Hope this helps
-denver
Michael Tully
Honored Contributor

Re: Which VG and LV are in the LUN

Hi,

Just use the following. This will show all disks
within each volume group and all logical volumes.

# vgdisplay -v

or output it for viewing

# vgdisplay -v >/tmp/vgdisplay.out

Match them using ioscan

# ioscan -funC disk > /tmp/ioscan.out

HTH
Michael
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: Which VG and LV are in the LUN

Following on from my previous response,
I should have included that once you have
identified what your volume groups are
and which disks are attached to each one
you run the

# pvdisplay -v /dev/dsk/cXtXdX

Michael
Anyone for a Mutiny ?
Shahul
Esteemed Contributor

Re: Which VG and LV are in the LUN

Hi

Follow this.

#strings /etc/lvmtab

Now it will list all vgs and corresponding PVs.
Now U can do pvdisplay for corresponding PVs or vgdisplay for corresponding VGs.

#vgdisplay -v /dev/vg01 |pg

This will list full information about that VG

#pvdisplay -v /dev/dsk/cxtxdx |pg

This will display full information about that PV.

#lvdisplay -v /dev/vg01/lvolx |pg

This will display complete information about that lvol.

For more information see man page of vgdisplay, pvdisplay, and lvdisplay.


Shahul