Skip to contentSkip to conversation

Repairing LVM installations

linux-lvm Bradley M Alexander 1 participant 1 message Oct 30, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Bradley Alexander
Quoted 7 lines
Quoted 3 lines

There might be a slight chance to get it back, if you have an LVM metadata backup at hand (/etc/lvmconf/vg00.conf) and use vgcfgrestore to restore it to the physical volume.

I tried this and when I tried listing the file, I got the same consistency error message:

Quoted 6 lines
Quoted 4 lines

[defiant /etc/lvmconf]# vgcfgrestore -f /etc/lvmconf/vg00.conf.2.old -l -n vg00
vgcfgrestore -- ERROR "vg_cfgrestore(): pv_check_consistency" restoring volume group "vg00"

"pvcreate -ff ..." on the PV first.

Okay, I tried this, it was successful

Quoted 3 lines

Well, if the vgcfgrestore brings your VG back it is still questionable what data is toasted. If any the move won't help either and you want to go for your backup media :(

The issue I am running into is that when I try to rebuild the lvm from scratch, I have been getting some strange errors. The base directories of the system are in / (including /, /usr, /lib, etc). LVM 1.0.5 is compiled into the kernel, not as modules.

I did the pvcreate -ff on each PV, then did a vgcreate vg00, and activated. Messages kept popping up about "Can't find module /dev/lvm" and "Can't find module /dev/vg00" and "invalidate: busy buffer". I finally got it to create the vg, created my partitions, then started restoring from backup. After over an hour of restoring, I had everything back to pretty much where I wanted it. Did a CTRL-D to go back to multiuser mode, and it wound up rebooting. When it came back up, the vgchange -a y vg00 told me that vg00 did not exist. How can I rebuild my volume group and get the data to stay on the machine?

Sorry for the vagueness of the post, but I am not sitting in front of the machine, and since the home directories do not exist, I can't ssh in to get the exact messages. But the pvs, lvs and partitions were in place, why is this not persistent through a reboot?

Thanks,
--Brad