1753769 Members
5056 Online
54796 Solutions
New Discussion юеВ

LVM info from new PV

 
BT Ireland
Occasional Contributor

LVM info from new PV

Hi,

I am writing scripts to automate a migration of HP-UX 11.11 servers from one FC switch to another.

I have the export scripts written to vgreduce the PV's from one path and I'm trying to write a script to automate the import after the device files change.

Once the HBA is moved to the new FC switch and the ioscan & insf creates the new devices files I can use vgscan to list all the new devices and their VGs.

However, how can I determine which VG the new devices belong to?

root@locutus:/migrate/mds/bin # pvdisplay /dev/dsk/c43t1d7
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c43t1d7" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c43t1d7".

root@locutus:/migrate/mds/bin # pvdisplay -l /dev/dsk/c43t1d7
/dev/dsk/c43t1d7:LVM_Disk=yes

root@locutus:/migrate/mds/bin # diskinfo /dev/rdsk/c43t1d7
SCSI describe of /dev/rdsk/c43t1d7:
vendor: HP
product id: OPEN-V
type: direct access
size: 48000 Kbytes
bytes per sector: 512
root@locutus:/migrate/mds/bin #

regards,
Shane

6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: LVM info from new PV

Consider to use xpinfo command and compare the results or run vgscan in preview mode.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: LVM info from new PV

Hi Shane:

You could read the LVM metadata of the raw devices to see which ones share a common VGID.

See my post in this thread:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1098858

Regards!

...JRF...
rariasn
Honored Contributor

Re: LVM info from new PV

Deeos
Regular Advisor

Re: LVM info from new PV

hi,


You can use

#pvdisplay /dev/dsk/cxtxdx|more



it will let you know the VG group associated with this disk.



Regards
Deeos
Deepak
BT Ireland
Occasional Contributor

Re: LVM info from new PV

Hi guys,

Thanks for all your responses.

Our servers are connected to HP XP storage and HP EVA storage with multiple paths to each LUN.

After an ioscan & insf I am using xpinfo & evainfo to determine the new & existing LUN information.

By cross referencing the XP CU:LDEVs & the EVA WWNN I am able to determine which Volume Group each device belongs to.

Thanks again
regards,
Shane
BT Ireland
Occasional Contributor

Re: LVM info from new PV

Thanks to all