Skip to contentSkip to conversation

made a big misstake

linux-lvm Michael Marxmeier 2 participants 2 messages Jul 19, 2000 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Andreas Dilger
Quoted 2 lines · Erik

Now the misstake, I did not run a vgreduce before I fdisk'ed the whole disk (hdb). Now when I start up, vgscan cannot find any vg's.

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.

Hope this helps
Michael

Signature · 4 lines
Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
#2 lore raw
Quoted 11 lines · Michael
Quoted 4 lines · Andreas Dilger

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.

Quoted 4 lines

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:

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · Eric

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

Signature · 3 lines
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