1756623 Members
2662 Online
108849 Solutions
New Discussion юеВ

lvmpvg file missing

 
Jacob D Levin
Frequent Advisor

lvmpvg file missing

I recently did a vgxport, rebuilt the box and then did a vgimport. I went to extend a filesystem today and it errored saying it couldn't find the /etc/lvmpvg file. I restored it from the backup I did before beginning the rebuild but when I tried to do the lvextend again I got a different error saying that the lmvtab and the lvmpvg files did not match. I can't seem to find a way to recreate the lvmpvg file. anyone know?
just hit enter, what could it hurt?
3 REPLIES 3
S.K. Chan
Honored Contributor

Re: lvmpvg file missing

You should be able to recreate /etc/lvmpvg by hand. See "man lvmpvg" for further details. I tested this on my system that does not have lvmpvg defined and it seems to work.
# vgdisplay -v vg01
..
PVName /dev/dsk/c2t11d0
PVStatus available
..
PVName /dev/dsk/c2t12d0
PVStatus available
...
Now I hand edit /etc/lvmpvg from scratch.
# cd /etc
# vi lvmpvg
VG vg01
PVG pvg1
/dev/dsk/c2t11d0
PVG pvg2
/dev/dsk/c2t12d0
If you run "vgdisplay -v vg01" again the pvg definition would be shown in the output.

Michael Steele_2
Honored Contributor

Re: lvmpvg file missing

It is possible to recreate the /etc/lvmpvg file from lvmtab. Order the disks as they appear in lvmtab and you should be OK. Don't worry about lvmtab being binary.

Been there, and its just the ordering.
Support Fatherhood - Stop Family Law
Sridhar Bhaskarla
Honored Contributor

Re: lvmpvg file missing

Hi,

If your logical volume(s) were created with PVG-Strict option, then it would look for the corresponding configuration in /etc/lvmpvg file. As mentioned before, you can manually update the /etc/lvmpvg file. If you restored it from the backup, make sure the order is the same as listed in 'strings /etc/lvmtab' or the device files are correct in it. When a box is rebuilt, most of the times, the controller numbers (cx) get changed and the device files may not match the old ones.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try