* [linux-lvm] LVM ate my data!
@ 2002-02-25 12:09 lvm-mail
2002-02-25 12:28 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 6+ messages in thread
From: lvm-mail @ 2002-02-25 12:09 UTC (permalink / raw)
To: linux-lvm
Hiya.
I've just upgraded my kernel, and on booting my LVM setup isn't
recognised. Going back to the old kernel, it still isn't.
Running vgscan gives:
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found inactive volume group "pvg"
vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "pvg" from physical volume(s)
vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
OK, create a new vg and import?
vgcreate gives:
vgcreate -- ERROR: "/etc/lvmtab" doesn't exist; please run vgscan
and pvscan gives:
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/hda3" is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/hda4" is associated to an unknown VG (run vgscan)
pvscan -- total: 2 [16.88 GB] / in use: 2 [16.88 GB] / in no VG: 0 [0]
Where do I go from here - vgcfgrestore? uuid_fixer? Even something really smelly!
Thanks,
Bill
(Sorry if this comes over a bit garbled, I'm posting using lynx, 'coz
pine's somewhere on /dev/hda4 ...)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM ate my data!
2002-02-25 12:09 [linux-lvm] LVM ate my data! lvm-mail
@ 2002-02-25 12:28 ` Heinz J . Mauelshagen
2002-02-25 13:14 ` wbh
2002-02-25 14:18 ` wbh
0 siblings, 2 replies; 6+ messages in thread
From: Heinz J . Mauelshagen @ 2002-02-25 12:28 UTC (permalink / raw)
To: linux-lvm
On Mon, Feb 25, 2002 at 06:09:09PM +0000, lvm-mail@wbh.org wrote:
> Hiya.
> I've just upgraded my kernel, and on booting my LVM setup isn't
> recognised. Going back to the old kernel, it still isn't.
> Running vgscan gives:
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- found inactive volume group "pvg"
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "pvg" from physical volume(s)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
>
In case *all* your PVs making up your VG are accessable, your LVM metadata
looks toasted.
> OK, create a new vg and import?
No.
You need to "pvcreate -ff" your PVs and vgcfgrestore a metadata backup
to all of them.
Before doing so, you can save your actual metadata for recovery in case
something goes badly wrong with:
for d in /dev/hda[34]
do
dd if=$d of=$(basename $d).vgda bs=1k count=1k
done
So, assuming /dev/hda[34] are all your PVs which belonged to the missing VG
(otherwise add those), figure out the recent metadata backup in /etc/lvmconf.
Say /etc/lvmconf/VG.conf would be the one.
Then run:
pvcreate -yff /dev/hda[34]
vgcfgrestore -n YourVGName /dev/hda3
vgcfgrestore -n YourVGName /dev/hda4
vgscan
vgchange -ay
> vgcreate gives:
> vgcreate -- ERROR: "/etc/lvmtab" doesn't exist; please run vgscan
> and pvscan gives:
> pvscan -- reading all physical volumes (this may take a while...)
> pvscan -- inactive PV "/dev/hda3" is associated to an unknown VG (run vgscan)
> pvscan -- inactive PV "/dev/hda4" is associated to an unknown VG (run vgscan)
> pvscan -- total: 2 [16.88 GB] / in use: 2 [16.88 GB] / in no VG: 0 [0]
>
> Where do I go from here - vgcfgrestore? uuid_fixer? Even something really smelly!
Please upgrade to LVM 1.0.3 and do the pvcreate + vgcfgrestore above.
> Thanks,
> Bill
> (Sorry if this comes over a bit garbled, I'm posting using lynx, 'coz
> pine's somewhere on /dev/hda4 ...)
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
--
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] 6+ messages in thread
* Re: [linux-lvm] LVM ate my data!
2002-02-25 12:28 ` Heinz J . Mauelshagen
@ 2002-02-25 13:14 ` wbh
2002-02-26 4:47 ` Heinz J . Mauelshagen
2002-02-25 14:18 ` wbh
1 sibling, 1 reply; 6+ messages in thread
From: wbh @ 2002-02-25 13:14 UTC (permalink / raw)
To: linux-lvm
On Mon, 25 Feb 2002, Heinz J . Mauelshagen wrote:
> In case *all* your PVs making up your VG are accessable, your LVM metadata
> looks toasted.
The bootup should just run "vgchange -ay", ah well!
> You need to "pvcreate -ff" your PVs and vgcfgrestore a metadata backup
> to all of them.
> Before doing so, you can save your actual metadata for recovery in case
> something goes badly wrong with:
OK, metadata saved.
> So, assuming /dev/hda[34] are all your PVs which belonged to the missing VG
> (otherwise add those), figure out the recent metadata backup in /etc/lvmconf.
> Say /etc/lvmconf/VG.conf would be the one.
>
> Then run:
Using the 1.0.3 versions...
> pvcreate -yff /dev/hda[34]
pvcreate -- WARNING: forcing physical volume creation on "/dev/hda3" of
volume group "pvg"
pvcreate -- physical volume "/dev/hda3" successfully created
pvcreate -- WARNING: forcing physical volume creation on "/dev/hda4" of
volume group "pvg"
pvcreate -- physical volume "/dev/hda4" successfully created
> vgcfgrestore -n YourVGName /dev/hda3
vgcfgrestore -- INFO: using backup file "/etc/lvmconf/pvg.conf"
vgcfgrestore -- ERROR: different structure size stored in
"/etc/lvmconf/pvg.conf" than expected in file vg_cfgrestore.c [line 139]
vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group "pvg"
Hmm. Same for ./vgcfgrestore -f /etc/lvmconf/pvg.conf*
> vgcfgrestore -n YourVGName /dev/hda4
> vgscan
> vgchange -ay
>
> Please upgrade to LVM 1.0.3 and do the pvcreate + vgcfgrestore above.
Got 1.0.3 Should I try the vgcfgresore with the old tools (v0.9)???
BTW, thanks very much for getting back so rapidly!
Thanks,
Bill
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM ate my data!
2002-02-25 12:28 ` Heinz J . Mauelshagen
2002-02-25 13:14 ` wbh
@ 2002-02-25 14:18 ` wbh
2002-02-26 4:45 ` Heinz J . Mauelshagen
1 sibling, 1 reply; 6+ messages in thread
From: wbh @ 2002-02-25 14:18 UTC (permalink / raw)
To: linux-lvm
Wahey - I got my data back, thankyou!
> pvcreate -yff /dev/hda[34]
> vgcfgrestore -n YourVGName /dev/hda3
> vgcfgrestore -n YourVGName /dev/hda4
> vgscan
> vgchange -ay
What I did, from .bash_history
rm -rf /etc/lvmtab /etc/lvmtab.d /dev/pvg # I had backed up already.
~/LVM/1.0.3/tools/vgscan
~/LVM/1.0.3/pvcreate -yff /dev/hda[34]
vgcfgrestore -n pvg /dev/hda3
vgcfgrestore -n pvg /dev/hda4
~/uuid_fixer/uuid_fixer /dev/hda3 /dev/hda4
~/LVM/1.0.3/tools/vgscan
~/LVM/1.0.3/tools/vgchange -ay
mount -treiserfs /dev/pvg/1 /mnt/dat
Don't know how much of that was needed...
I had been playing with snapshots recently, but they didn't seem to work
with my ancient (2.4.3) kernel. Could that have been the cause?
Thanks!
Bill
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM ate my data!
2002-02-25 14:18 ` wbh
@ 2002-02-26 4:45 ` Heinz J . Mauelshagen
0 siblings, 0 replies; 6+ messages in thread
From: Heinz J . Mauelshagen @ 2002-02-26 4:45 UTC (permalink / raw)
To: linux-lvm
On Mon, Feb 25, 2002 at 08:18:10PM +0000, wbh wrote:
> Wahey - I got my data back, thankyou!
>
> > pvcreate -yff /dev/hda[34]
> > vgcfgrestore -n YourVGName /dev/hda3
> > vgcfgrestore -n YourVGName /dev/hda4
> > vgscan
> > vgchange -ay
>
> What I did, from .bash_history
> rm -rf /etc/lvmtab /etc/lvmtab.d /dev/pvg # I had backed up already.
> ~/LVM/1.0.3/tools/vgscan
> ~/LVM/1.0.3/pvcreate -yff /dev/hda[34]
> vgcfgrestore -n pvg /dev/hda3
> vgcfgrestore -n pvg /dev/hda4
> ~/uuid_fixer/uuid_fixer /dev/hda3 /dev/hda4
> ~/LVM/1.0.3/tools/vgscan
> ~/LVM/1.0.3/tools/vgchange -ay
> mount -treiserfs /dev/pvg/1 /mnt/dat
>
> Don't know how much of that was needed...
All of that probably.
uuid_fixer covers a bug in older vgcfgrestore versions which prevented correct
restores of the PV UUID tables to all PVs.
>
> I had been playing with snapshots recently, but they didn't seem to work
> with my ancient (2.4.3) kernel. Could that have been the cause?
In case you haven't patched in the newest LVM driver code following the
instrcutions in PATCHES/README contained in the LVM distro -> yes.
>
> Thanks!
> Bill
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
--
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] 6+ messages in thread
* Re: [linux-lvm] LVM ate my data!
2002-02-25 13:14 ` wbh
@ 2002-02-26 4:47 ` Heinz J . Mauelshagen
0 siblings, 0 replies; 6+ messages in thread
From: Heinz J . Mauelshagen @ 2002-02-26 4:47 UTC (permalink / raw)
To: linux-lvm
On Mon, Feb 25, 2002 at 07:14:33PM +0000, wbh wrote:
> On Mon, 25 Feb 2002, Heinz J . Mauelshagen wrote:
>
> > In case *all* your PVs making up your VG are accessable, your LVM metadata
> > looks toasted.
>
> The bootup should just run "vgchange -ay", ah well!
>
> > You need to "pvcreate -ff" your PVs and vgcfgrestore a metadata backup
> > to all of them.
> > Before doing so, you can save your actual metadata for recovery in case
> > something goes badly wrong with:
>
> OK, metadata saved.
>
> > So, assuming /dev/hda[34] are all your PVs which belonged to the missing VG
> > (otherwise add those), figure out the recent metadata backup in /etc/lvmconf.
> > Say /etc/lvmconf/VG.conf would be the one.
> >
> > Then run:
> Using the 1.0.3 versions...
>
> > pvcreate -yff /dev/hda[34]
>
> pvcreate -- WARNING: forcing physical volume creation on "/dev/hda3" of
> volume group "pvg"
> pvcreate -- physical volume "/dev/hda3" successfully created
> pvcreate -- WARNING: forcing physical volume creation on "/dev/hda4" of
> volume group "pvg"
> pvcreate -- physical volume "/dev/hda4" successfully created
>
> > vgcfgrestore -n YourVGName /dev/hda3
> vgcfgrestore -- INFO: using backup file "/etc/lvmconf/pvg.conf"
> vgcfgrestore -- ERROR: different structure size stored in
> "/etc/lvmconf/pvg.conf" than expected in file vg_cfgrestore.c [line 139]
> vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group "pvg"
Oops. Forgot that one.
If you have a rather old LVM version in use, the VGDA backups can only be
restored using that version specific vgcfgrestore.
So, you absolutely did the right things you reported in your previous email.
>
> Hmm. Same for ./vgcfgrestore -f /etc/lvmconf/pvg.conf*
>
> > vgcfgrestore -n YourVGName /dev/hda4
> > vgscan
> > vgchange -ay
> >
> > Please upgrade to LVM 1.0.3 and do the pvcreate + vgcfgrestore above.
>
> Got 1.0.3 Should I try the vgcfgresore with the old tools (v0.9)???
Yes, as you already did :-)
The new vgcfgrestore makes uuid_fixer obsolete in case you should run into
such problem again.
>
> BTW, thanks very much for getting back so rapidly!
>
> Thanks,
> Bill
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
--
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] 6+ messages in thread
end of thread, other threads:[~2002-02-26 4:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-25 12:09 [linux-lvm] LVM ate my data! lvm-mail
2002-02-25 12:28 ` Heinz J . Mauelshagen
2002-02-25 13:14 ` wbh
2002-02-26 4:47 ` Heinz J . Mauelshagen
2002-02-25 14:18 ` wbh
2002-02-26 4:45 ` Heinz J . Mauelshagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox