Operating System - HP-UX
1825789 Members
2120 Online
109687 Solutions
New Discussion

how to recreate /etc/lvmpvg file

 
SOLVED
Go to solution
caj
Frequent Advisor

how to recreate /etc/lvmpvg file



Hi all ,

We have migrated our storage from dmx to dmx3 .after that the disk path has changed .so we are not able to access PVG .
how do i go ahead and recreate the /etc/lvmpvg file with the new disk details ..

thanks
Ajeesh
6 REPLIES 6
Fabio Ettore
Honored Contributor

Re: how to recreate /etc/lvmpvg file

Hi,

/etc/lvmpvg is an ascii file.
You can edit it manually changing the current device files with the new device files. After that you can see it by vgdisplay -v .
All details in man lvmpvg.

Best regards,
Fabio
WISH? IMPROVEMENT!
Torsten.
Acclaimed Contributor

Re: how to recreate /etc/lvmpvg file

see "man lvmpvg"

VG vg_name
PVG pvg_name
pv_path
...
PVG pvg_name
pv_path
...
VG vg_name
PVG pvg_name
pv_path
...

heavy network problems on itrc today :-(

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!   
caj
Frequent Advisor

Re: how to recreate /etc/lvmpvg file

thanks for your replay .

We have around 100+ vg's configured .it is difficult to edit lvmpvg manually .I am looking for some kind of script to enable my work easy .

Thanks
Ajeesh
Torsten.
Acclaimed Contributor

Re: how to recreate /etc/lvmpvg file

The PVG is used for mirroring, to make it easier to find "mirroring pairs". Just to prevent your mirrors are on the same bus.

Do you use LVM mirroring?




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
Solution

Re: how to recreate /etc/lvmpvg file

Hi:

You can easily query your server to collect the current 'lvmpvg' information into a file that you can further edit. Do something like:

# VGS=`vgdisplay -v|grep "LV Name"|awk -F"/" '{print $3}'|sort -u`

# for VG in ${VGS} do
> vgdisplay -v ${VG}|sed -ne '/Physical volume groups/,$p' >> /tmp/lvmpvg
> done

You will need to edit the resulting '/tmp/lvmpvg' fiels, but it will provide the basis of what you need.

Regards!

...JRF...
caj
Frequent Advisor

Re: how to recreate /etc/lvmpvg file

Thanks JRF

I am closing this thread