<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
On Mon, 2004-03-15 at 12:34, Heinz Mauelshagen wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>
You need to select the last valid metadata backup of vg2 from /etc/lvmconf
(check it with vgcfgrestore -ll -f /etc/lvmconf/vg2.conf[.#.old]; see
'man vgcfgrestore for metadata archive file names) and restore it.

Say vg.conf.1.old is the valid one:

for dev in AllPVsOfVG2 # list all PVs reported by vgcfgrestore -ll above
do
        pvcreate -ff $dev
        vgcfgrestore -f /etc/lvmconf/vg.conf.1.old $dev
done
vgscan
vgchange -ay vg2
</I></FONT></PRE>
</BLOCKQUOTE>
<BR>
That did the trick thanks. :-)<BR>
<BR>
Of course in a moment of not concentrating I messed things up again.  I still had pvremove on the disk from when I previously installed the lvm2 tools, and although I wanted to do a vgreduce I did a pvremove.  Even when it kicked up an error I just followed what it said and typed pvremove -ff. oops :-/<BR>
<BR>
Now I get a a similar error as before with vgscan, and other tools give a 'VGDA in kernel and lvmtab are NTO consistent: please run vgscan' error.<BR>
<BR>
I tried re-running what you suggested above but vgcfgrestore gives a 'can't restore part of active volume group "vg2"' error.<BR>
<BR>
Is there anyway to recover from my stupidity (other than a lobotomy!)?<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>