[linux-lvm] pvcreate & vgcfgrestore won't work
Bryn M. Reeves
bmr at redhat.com
Tue Jan 6 12:08:56 UTC 2009
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.
More information about the linux-lvm
mailing list