[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] made a big misstake

Michael writes:
> Andreas Dilger wrote:
> > Was hdb1 the first PV created in the VG?  The problem, I think, is that
> > Linux LVM only keeps the VGDA on the first PV.  AIX will keep a VGDA
> > copy on all of the PVs, and even will keep 2 VGDAs on the first PV for
> > backup, in case the first one is corrupt.
> Actually, LVM should have a copy of the dscriptor area. It is kept in
> the file system in the directory /etc/lvmconf which even has the nice
> property that you can back it up. The VGDA is implecitely backed up by 
> most LVM  commands. 
> You should be able to restore them with vgcfgrestore.
> The vgcfgrestore syntax seems to sugest you can even restore it
> to another physical volume (no tested, personally) which would
> solve the actual problem nicely.

Unfortunately, I didn't quote all of the original message.  One part you
must have missed from the original posting:

> > Eric writes:
> > > I was thinking that creating a new pv (on /dev/hdb1) and running 
> > > vgcfgrestore -n disk_vg /dev/hdb1 would help me get it back but it just
> > > say that "size of physical volume /dev/hdb1 differs from backup" and I
> > > cannot remember what size I had last time

So vgcfgrestore is not useful in this case, since it can't be restored to
the new partition or to the other PV in the VG.  Having a VGDA on each PV
in a VG would solve this problem.  It would also fix the major problem
that would happen if the VGDA for the root filesystem/VG is corrupt - you
cannot access the VGDA backups in /etc/lvmconf in this case at all, and
even a rescue disk will not help you because the VG layout is not known.

Cheers, Andreas
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]