PV segments corrupted in vg1 : LVM corrupted
After removing some logical volumes (backup,etc) and extending home logical volume, data in the whole volume group (vg1) has become
corrupted: Root logical volume is mounted at boot time, but am unable to mount any other logical volumes in that volume group (var,home etc) after reboot.
pvscan displays : PV segment VG free_count mismatch: 0 != 4294966485
Internal error: PV segments corrupted in vg1. No matching physical volumes found
vgdisplay, vgchange,vgscan display similiar message.
Using 2 IDE drives, with 2 meta disks on each (mirrored across the drives). 1 meta disk contains boot
1 meta disk contains LVM - 1 volume group, logical volumes for root,swap,var,usr,home
vgcfgrestore fails.
/etc/lvm/backup/vg1 contains (english) description of last known state of the logical volumes./etc/lvmconf/vg1.conf is a binary file (may be out of date) /etc/lvmtab.d/vg1 appears to be the same binary file above (may be out of date)
System is Debian Unstable, running lvm2,udev,device mapper, kernel 2.6.8 compiled from Debian source. System appeared stable for 1 week after lvm changes, but failed on reboot.
1. What command can be used to recreate the vg1.conf binary file from the english description backup? (vg1.conf modification date is older than changes)
2. What is the VG free count and how can it be reset to 0?
3. What other tools available to fix broken lvm.
Thank you
Quoted 19 lines · Jeff Ewing
After removing some logical volumes (backup,etc) and extending home logical volume, data in the whole volume group (vg1) has become
corrupted: Root logical volume is mounted at boot time, but am unable to mount any other logical volumes in that volume group (var,home etc) after reboot.pvscan displays : PV segment VG
free_countmismatch: 0 != 4294966485Internal error: PV segments corrupted in vg1. No matching physical volumes foundvgdisplay, vgchange,vgscan display similiar message.
Using 2 IDE drives, with 2 meta disks on each (mirrored across the drives). 1 meta disk contains boot
1 meta disk contains LVM - 1 volume group, logical volumes for root,swap,var,usr,homevgcfgrestore fails.
Quoted 8 lines
/etc/lvm/backup/vg1contains (english) description of last known state of the logical volumes./etc/lvmconf/vg1.confis a binary file (may be out of date)/etc/lvmtab.d/vg1appears to be the same binary file above (may be out of date)System is Debian Unstable, running lvm2,udev,device mapper, kernel 2.6.8 compiled from Debian source. System appeared stable for 1 week after lvm changes, but failed on reboot.
Was your VG made with LVM1? There has been a report similar to this one on the list about LVM1 formatted VGs not working with the latest version of lvm2
Quoted 3 lines
1. What command can be used to recreate the vg1.conf binary file from the english description backup? (vg1.conf modification date is older than changes)
This is an lvm1 file - all lvm2 files are in /etc/lvm/
Quoted 3 lines
2. What is the VG free count and how can it be reset to 0?
3. What other tools available to fix broken lvm.
You could try going back to an older version of the lvm2 tools and see if it fixes things.
Signature · 8 lines
AJ Lewis Voice: 612-638-0500 Red Hat Inc. E-Mail: [email protected] One Main Street SE, Suite 209 Minneapolis, MN 55414 Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715 Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the many keyservers out there...
The server was running kernel 2.4.27+lvm1 until one month ago. Was upgraded to 2.6.8+lvm2 and running and rebooted several times since.
Quoted 3 lines
This is an lvm1 file - all lvm2 files are in
/etc/lvm/
The output from "vgcfgrestore vg1" is
PV /dev/md1 is a different format (seqno lvm1)
Restore failed.
Quoted 6 lines
Quoted 3 lines
2. What is the VG free count and how can it be reset to 0?
3. What other tools available to fix broken lvm.
You could try going back to an older version of the lvm2 tools and see if it fixes things.
Without /var it is a little tricky to downgrade the packages(package lists etc are missing). Perhaps install on another server and copy over (ssh fails but nfs is working).
Thank you
Noticed that pvdisplay works, and looks bad (0 Allocated PE)
--- Physical volume ---
PV Name /dev/md1 VG Name vg1 PV Size 25.40 GB / not usable 59.38 MB Allocatable yes PE Size (KByte) 32768 Total PE 811 Free PE 811 Allocated PE 0 PV UUID EW1NJk-11h8-GVOX-zmcn-2l3V-fg0G-RWNyod
also mdadm cannot find an md superblock(not sure what this means):
mdadm --detail --query /dev/md1/dev/md1: 25.40GiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail./dev/md1: No md super block found, not an md component.
lvmdiskscan looks ok.
lvm dumpconfig looks ok.
Re-install of OS looks likely, just dont know why things got corrupted. Dont know where the pv volume information is stored.
Quoted 2 lines · Jeff Ewing
The output from "vgcfgrestore vg1" is
PV/dev/md1is a different format (seqno lvm1)
Add -M1 to force it to use lvm1 metadata format (default is new format - or change default globally in lvm.conf).
Alasdair
Signature · 1 line
[email protected]
Solved. Thankyou to Aj, Alasdair (and Redhat).
vgcfgrestore -M1 vg1
vgconvert -M2 vg1
reboot
1. I do not know how I missed this, it is clearly in the FAQ
2. This only appeared after reconfiguring logical volumes, several weeks/reboots after "converting" to lvm2 (clearly not complete converion, was using lvm2inird but must have been reading the lvm1 formats.
Quoted 17 lines · Alasdair G Kergon
Quoted 2 lines · Jeff Ewing
The output from "vgcfgrestore vg1" is
PV/dev/md1is a different format (seqno lvm1)Add -M1 to force it to use lvm1 metadata format (default is new format - or change default globally in lvm.conf).
Alasdair
Signature · 7 lines
[email protected] _______________________________________________ linux-lvm mailing list [email protected] https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/