All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] vgcfgrestore fails.
@ 2001-04-28 17:33 root
  0 siblings, 0 replies; 5+ messages in thread
From: root @ 2001-04-28 17:33 UTC (permalink / raw)
  To: linux-lvm

I am running SuSe 7.1 
2.4.0 kernel 
512M Ram
AhA2940U2W
suse lvm

I had three volume groups and a week ago the volume group that contained user 
had a drive crash.  I was unable to save usr but now I can not mount any of 
my other volume groups and vgcfgrestore fails.  Is their any thing I can do 
to get my data?  
thor:~ # pvdisplay /dev/sdd2
--- Physical volume ---
PV Name               /dev/sdd2
VG Name               export
PV Size               8.3 GB / NOT usable 3.31 MB [LVM: 238 KB]
PV#                   2
PV Status             available
Allocatable           yes (but full)
Cur LV                1
PE Size (KByte)       4096
Total PE              2123
Free PE               0
Allocated PE          2123
PV UUID               ruLId0-1JoY-34Ja-oLW0-FmzV-Q5ZN-NQaZw9
thor:~ # pvdisplay /dev/sdc2
--- Physical volume ---
PV Name               /dev/sdc2
VG Name               export
PV Size               8.3 GB / NOT usable 3.31 MB [LVM: 238 KB]
PV#                   1
PV Status             available
Allocatable           yes (but full)
Cur LV                1
PE Size (KByte)       4096
Total PE              2123
Free PE               0
Allocated PE          2123
PV UUID               ynnKCX-mjlT-jeNe-9MHY-tnP2-XCIC-nbKrmq
 
thor:~ # vgcfgrestore -n export /dev/sdd2
vgcfgrestore -- ERROR: different structure size stored in "/etc/lvmconf/export.conf" than expected in file vg_cfgrestore.c [line 
122]
vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group "export"
                                                                              
          

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [linux-lvm] vgcfgrestore fails.
@ 2001-04-30 16:04 Heinz J. Mauelshagen
  2001-04-30 12:03 ` Hcd
  0 siblings, 1 reply; 5+ messages in thread
From: Heinz J. Mauelshagen @ 2001-04-30 16:04 UTC (permalink / raw)
  To: linux-lvm

On Sat, Apr 28, 2001 at 12:33:58PM -0500, root wrote:
> I am running SuSe 7.1 
> 2.4.0 kernel 
> 512M Ram
> AhA2940U2W
> suse lvm
> 
> I had three volume groups and a week ago the volume group that contained user 
> had a drive crash.  I was unable to save usr but now I can not mount any of 
> my other volume groups and vgcfgrestore fails.  Is their any thing I can do 
> to get my data?  
> thor:~ # pvdisplay /dev/sdd2
> --- Physical volume ---
> PV Name               /dev/sdd2
> VG Name               export
> PV Size               8.3 GB / NOT usable 3.31 MB [LVM: 238 KB]
> PV#                   2
> PV Status             available
> Allocatable           yes (but full)
> Cur LV                1
> PE Size (KByte)       4096
> Total PE              2123
> Free PE               0
> Allocated PE          2123
> PV UUID               ruLId0-1JoY-34Ja-oLW0-FmzV-Q5ZN-NQaZw9
> thor:~ # pvdisplay /dev/sdc2
> --- Physical volume ---
> PV Name               /dev/sdc2
> VG Name               export
> PV Size               8.3 GB / NOT usable 3.31 MB [LVM: 238 KB]
> PV#                   1
> PV Status             available
> Allocatable           yes (but full)
> Cur LV                1
> PE Size (KByte)       4096
> Total PE              2123
> Free PE               0
> Allocated PE          2123
> PV UUID               ynnKCX-mjlT-jeNe-9MHY-tnP2-XCIC-nbKrmq
>  
> thor:~ # vgcfgrestore -n export /dev/sdd2
> vgcfgrestore -- ERROR: different structure size stored in "/etc/lvmconf/export.conf" than expected in file vg_cfgrestore.c [line 
> 122]
> vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group "export"
>                                                                               

You are using a newer LVM versions which has different metadata definitions
that the one which created those backups.

My guess is, that you are using LVM > 0.9.1 Beta 3 *now* but created the
backups with a lower LVM 0.9 version and you suffer from a PV uuid related
bug preventing vgscan to find your VG.


One way to address the situation (pressuming no VGs are active) is:

- create /etc/lvmtab.d/ in case it doesn't exist

- copy /etc/lvmconf/export.conf to /etc/lvmtab.d/export

- echo -ne 'export\0' > /etc/lvmtab

- vgchange -ay

If the VG named "export" comes back to life this way (assuming that the user LV
belongs to it) do:

- lvreduce -l1 /dev/export/user
- lvrextend -l1 /dev/export/user

replace "user" with a valid LV name in case I assumed wrong.

The purpose of that NULL operation in the end is, that your PV uuid list
gets recreated by LVM >= 0.9.1 Beta 4 which should make vgscan happy again ;-)

The last 2 commands just shrink user by 1 LE and grow it again which
is necessary, because your export VG is *full*. This will not harm the user
LV in the end, because the allocator has the only option to use the very same
PE for growing which was freed before by the shrinking of user.

If your VG had at least 1 free PE a lvcreate/lvremove cycle for a dummy
LV with just 1 LE had done it as well.

Please tell us if this helps you or we need to go for another solution.

>           
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

end of thread, other threads:[~2001-05-02 12:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-28 17:33 [linux-lvm] vgcfgrestore fails root
  -- strict thread matches above, loose matches on Subject: below --
2001-04-30 16:04 Heinz J. Mauelshagen
2001-04-30 12:03 ` Hcd
2001-04-30 17:34   ` Hcd
2001-05-02 12:42     ` Heinz J. Mauelshagen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.