[linux-lvm] How to restore a PV ??
Brian McCullough
bdmc at bdmcc-us.com
Tue Nov 14 23:00:03 UTC 2006
I am having a similar problem with a drive that was created under LVM
version 1. More questions below.
On Mon, Oct 16, 2006 at 02:20:14PM -0500, Jonathan E Brassow wrote:
> On each disk in the volume group is a record of the changes that have
> been made to the volume group. The last item in the record is the
> current lvm meta-data. If you can retrieve that, it is the same as
> having the backup file which would normally be found in
> /etc/lvm/backup.
>
> You could use hexdump, but I find it much simpler to use 'less -f
> <device>'. You should see something like:
>
> <crap>
> principal {
> ...
> }
> <comments>
> <crap>
> principal {
> ...
> }
> <comments>
> <crap>
Is this also true for LVM1? I have examined the disk ( there are 5 LVs
on this disk, one elsewhere ( nowhere! ) ) and it doesn't seem to follow
this format.
If this is not true, is there any way to recover such a Volume Group?
Here is what vgscan and pvscan show:
[root at clachan media]# pvscan
5 PV(s) found for VG vg_system: expected 6
Logical volume (lvol4) contains an incomplete mapping table.
PV segment VG free_count mismatch: 1381 != 2572
PV segment VG extent_count mismatch: 1417 != 2608
Internal error: PV segments corrupted in vg_system.
[root at clachan media]# vgscan
Reading all physical volumes. This may take a while...
5 PV(s) found for VG vg_system: expected 6
5 PV(s) found for VG vg_system: expected 6
Volume group "vg_system" not found
[root at clachan media]# vgchange -a y --partial vg_system
Partial mode. Incomplete volume groups will be activated read-only.
5 PV(s) found for VG vg_system: expected 6
Logical volume (lvol4) contains an incomplete mapping table.
PV segment VG free_count mismatch: 1381 != 2572
PV segment VG extent_count mismatch: 1417 != 2608
Internal error: PV segments corrupted in vg_system.
Unable to find volume group "vg_system"
I do have several copies of the config file, also on this drive ( in a
real ext2 partition! ). Could I just edit the file to remove lvol4 (
with 250 segments! ) and do a vgcfgrestore from an LVM2 system?
Thank you,
Brian
More information about the linux-lvm
mailing list