linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] PV segments corrupted in vg1 : LVM corrupted
@ 2005-06-22 11:37 Jeff Ewing
  2005-06-22 14:15 ` AJ Lewis
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Ewing @ 2005-06-22 11:37 UTC (permalink / raw)
  To: linux-lvm

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] PV segments corrupted in vg1 : LVM corrupted
  2005-06-22 11:37 [linux-lvm] PV segments corrupted in vg1 : LVM corrupted Jeff Ewing
@ 2005-06-22 14:15 ` AJ Lewis
  2005-06-23  1:02   ` [linux-lvm] " Jeff Ewing
  0 siblings, 1 reply; 6+ messages in thread
From: AJ Lewis @ 2005-06-22 14:15 UTC (permalink / raw)
  To: Jeff Ewing, LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]

On Wed, Jun 22, 2005 at 09:37:13PM +1000, Jeff Ewing wrote:
> 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.

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
 
> 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/
 
> 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.

-- 
AJ Lewis                                   Voice:  612-638-0500
Red Hat Inc.                               E-Mail: alewis@redhat.com
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...


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-lvm] Re: PV segments corrupted in vg1 : LVM corrupted
  2005-06-22 14:15 ` AJ Lewis
@ 2005-06-23  1:02   ` Jeff Ewing
  2005-06-23  6:01     ` Jeff Ewing
  2005-06-23  8:11     ` Alasdair G Kergon
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Ewing @ 2005-06-23  1:02 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: AJ Lewis

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.
> 
> 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.

> > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-lvm] Re: PV segments corrupted in vg1 : LVM corrupted
  2005-06-23  1:02   ` [linux-lvm] " Jeff Ewing
@ 2005-06-23  6:01     ` Jeff Ewing
  2005-06-23  8:11     ` Alasdair G Kergon
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Ewing @ 2005-06-23  6:01 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: AJ Lewis

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Re: PV segments corrupted in vg1 : LVM corrupted
  2005-06-23  1:02   ` [linux-lvm] " Jeff Ewing
  2005-06-23  6:01     ` Jeff Ewing
@ 2005-06-23  8:11     ` Alasdair G Kergon
  2005-06-24  2:02       ` Jeff Ewing
  1 sibling, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2005-06-23  8:11 UTC (permalink / raw)
  To: LVM general discussion and development

On Thu, Jun 23, 2005 at 11:02:52AM +1000, Jeff Ewing wrote:
> The output from "vgcfgrestore vg1" is 
>   PV /dev/md1 is 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
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-lvm] Re: PV segments corrupted in vg1 : LVM corrupted
  2005-06-23  8:11     ` Alasdair G Kergon
@ 2005-06-24  2:02       ` Jeff Ewing
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Ewing @ 2005-06-24  2:02 UTC (permalink / raw)
  To: LVM general discussion and development

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. 

On 6/23/05, Alasdair G Kergon <agk@redhat.com> wrote:
> On Thu, Jun 23, 2005 at 11:02:52AM +1000, Jeff Ewing wrote:
> > The output from "vgcfgrestore vg1" is 
> >   PV /dev/md1 is 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
> -- 
> agk@redhat.com
> 
> _______________________________________________
> 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/
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-24  2:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 11:37 [linux-lvm] PV segments corrupted in vg1 : LVM corrupted Jeff Ewing
2005-06-22 14:15 ` AJ Lewis
2005-06-23  1:02   ` [linux-lvm] " Jeff Ewing
2005-06-23  6:01     ` Jeff Ewing
2005-06-23  8:11     ` Alasdair G Kergon
2005-06-24  2:02       ` Jeff Ewing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).