Re: pvcreate & vgcfgrestore won't work

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

 



Ralf Sparr wrote:
Hi list,

as mentioned in my earlier post, LVM complains about
"Incorrect metadata area header checksum". As this occurs
often (many questions, rarely answers in the list) I tried to create
some 'new' via

Running pvcreate followed by vgcfgrestore is the correct way to fix a broken MDA checksum - I've used this many times to recover from these situations.

# pvcreate --force --uuid 7vFXd3-MYnt-TVdG-luYr-rDPn-o8a1-vjewWk
--restorefile /etc/lvm/archive/alice_00038.vg alice

Your syntax is wrong. You've got:

pvcreate -f -u=$UUID --restorefile=/path $VGNAME

But pvcreate is expecting a PV path as the last argument (the device to be initialised as a PV), not a VG name (are you confusing this with the vgcfgrestore arguments?).

This works just fine for me:

# pvcreate -f --uuid 6cxF7v-f0XU-3EK1-QhA2-YSVT-yEe3-vQnE09 --restorefile /etc/lvm/archive/l0_00000.vg /dev/loop0 Can't initialize physical volume "/dev/loop0" of volume group "l0" without -ff

# pvcreate -ff --uuid 6cxF7v-f0XU-3EK1-QhA2-YSVT-yEe3-vQnE09 --restorefile /etc/lvm/archive/l0_00000.vg /dev/loop0
Really INITIALIZE physical volume "/dev/loop0" of volume group "l0" [y/n]? y
WARNING: Forcing physical volume creation on /dev/loop0 of volume group "l0"
  Physical volume "/dev/loop0" successfully created

# vgcfgrestore -f /etc/lvm/archive/l0_00000.vg l0
  Restored volume group l0

Regards,
Bryn.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux