Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] Lost VG after failed pvmove
@ 2001-09-23 10:43 Thomas Svedberg
  2001-09-23 11:28 ` Thomas Svedberg
  2001-09-24 10:27 ` Heinz J . Mauelshagen
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Svedberg @ 2001-09-23 10:43 UTC (permalink / raw)
  To: linux-lvm

I know, I should have made a backup. But I didn't so ...

Short version:
After a failed pvmove I can not find my VG.

Long version:
I was about to move more parts of my fs over to LVm and therefore used a
new disk as help. And apparantly the wrong way.
I first created a PV on the new disk and then added it to my VG, no
problems.
I then shrank the LV:s to fit the new disk. OK
Next I pvmoved the LV:s from the original disk to the new one, still no
problems.
Then I removed the different PV from the original disk (I had started ot
with a small one and then moved LV over to LVM one after the other and
adding the freed spacce to the VG), removed the partitions and created one
new big one instead of all the small.
pvcreated it and vgextended it, all OK.
So now I wanted to move the data back to this (faster) disk.
pvmove failed after moving a few (24 ?, see below) LE (PE?).

The fs seemed OK and I rebooted to see if it helped. No
After reboot no VG was found.
pvdisplay showed the newly added (destination of the move) PV as new, i.e.
not belonging to any VG.

Using vgcfgresore I was able to make the PV look like it belonged to my
VG, but it looks empty still.

Still nothing is found by vgscan.

Reading through the howto I found the Dangerous Operations and did as
described there. Now vgscan finds my VG but it says:

vgscan -- only found 1357 of 1381 LEs for LV /dev/my_vg/home (0)
vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "my_vg" from physical volume(s)
vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"

vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found inactive volume group "my_vg"

so it seems the 24 LE:s that was moved is 'missing'

Can anyone help me restore this ?

And, yes, next time I will be using tar to move my data....

/ Thomas
.......................................................................
 Thomas Svedberg
 Department of Mathematics
 Chalmers University of Technology

 Address: SE-412 96 Göteborg, SWEDEN
 E-mail : thsv@bigfoot.com, thsv@math.chalmers.se
 Phone  : +46 31 772 5368
 Fax    : +46 31 772 3595
.......................................................................

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

* Re: [linux-lvm] Lost VG after failed pvmove
  2001-09-23 10:43 [linux-lvm] Lost VG after failed pvmove Thomas Svedberg
@ 2001-09-23 11:28 ` Thomas Svedberg
  2001-09-24 10:27 ` Heinz J . Mauelshagen
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Svedberg @ 2001-09-23 11:28 UTC (permalink / raw)
  To: linux-lvm

the output of pvdata -a can be found at

http://thsv.dnsalias.org/~thsv/hda6.data
http://thsv.dnsalias.org/~thsv/hdb2.data

Where hdb2 was the source in the move and hda6 the destination.

/ Thomas
.......................................................................
 Thomas Svedberg
 Department of Mathematics
 Chalmers University of Technology

 Address: SE-412 96 Göteborg, SWEDEN
 E-mail : thsv@bigfoot.com, thsv@math.chalmers.se
 Phone  : +46 31 772 5368
 Fax    : +46 31 772 3595
.......................................................................

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

* Re: [linux-lvm] Lost VG after failed pvmove
  2001-09-23 10:43 [linux-lvm] Lost VG after failed pvmove Thomas Svedberg
  2001-09-23 11:28 ` Thomas Svedberg
@ 2001-09-24 10:27 ` Heinz J . Mauelshagen
  2001-09-24 11:23   ` Thomas Svedberg
  1 sibling, 1 reply; 4+ messages in thread
From: Heinz J . Mauelshagen @ 2001-09-24 10:27 UTC (permalink / raw)
  To: linux-lvm

Thomas,

you need to vgcfgrestore the metadata backaup to *all* of the PVs which belonged
to the VG at the time the backup was created.
Then vgscan should see your VG quite happily again.

In regard to the pvmove error: do you have the particular error output it gave?

Regards,
Heinz    -- The LVM Guy --


On Sun, Sep 23, 2001 at 12:43:36PM +0200, Thomas Svedberg wrote:
> I know, I should have made a backup. But I didn't so ...
> 
> Short version:
> After a failed pvmove I can not find my VG.
> 
> Long version:
> I was about to move more parts of my fs over to LVm and therefore used a
> new disk as help. And apparantly the wrong way.
> I first created a PV on the new disk and then added it to my VG, no
> problems.
> I then shrank the LV:s to fit the new disk. OK
> Next I pvmoved the LV:s from the original disk to the new one, still no
> problems.
> Then I removed the different PV from the original disk (I had started ot
> with a small one and then moved LV over to LVM one after the other and
> adding the freed spacce to the VG), removed the partitions and created one
> new big one instead of all the small.
> pvcreated it and vgextended it, all OK.
> So now I wanted to move the data back to this (faster) disk.
> pvmove failed after moving a few (24 ?, see below) LE (PE?).
> 
> The fs seemed OK and I rebooted to see if it helped. No
> After reboot no VG was found.
> pvdisplay showed the newly added (destination of the move) PV as new, i.e.
> not belonging to any VG.
> 
> Using vgcfgresore I was able to make the PV look like it belonged to my
> VG, but it looks empty still.
> 
> Still nothing is found by vgscan.
> 
> Reading through the howto I found the Dangerous Operations and did as
> described there. Now vgscan finds my VG but it says:
> 
> vgscan -- only found 1357 of 1381 LEs for LV /dev/my_vg/home (0)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "my_vg" from physical volume(s)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
> 
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- found inactive volume group "my_vg"
> 
> so it seems the 24 LE:s that was moved is 'missing'
> 
> Can anyone help me restore this ?
> 
> And, yes, next time I will be using tar to move my data....
> 
> / Thomas
> .......................................................................
>  Thomas Svedberg
>  Department of Mathematics
>  Chalmers University of Technology
> 
>  Address: SE-412 96 Göteborg, SWEDEN
>  E-mail : thsv@bigfoot.com, thsv@math.chalmers.se
>  Phone  : +46 31 772 5368
>  Fax    : +46 31 772 3595
> .......................................................................
> 
> 
> _______________________________________________
> 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

*** 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] 4+ messages in thread

* Re: [linux-lvm] Lost VG after failed pvmove
  2001-09-24 10:27 ` Heinz J . Mauelshagen
@ 2001-09-24 11:23   ` Thomas Svedberg
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Svedberg @ 2001-09-24 11:23 UTC (permalink / raw)
  To: linux-lvm

On Mon, 24 Sep 2001, Heinz J . Mauelshagen wrote:

> you need to vgcfgrestore the metadata backaup to *all* of the PVs which belonged
> to the VG at the time the backup was created.

OK, this was my error, I only used it on the pv I found damaged.

This + using the uuid_fixer made it work again.
Thank you very much for this!

> In regard to the pvmove error: do you have the particular error output it gave?

No, all I remember it was a very short or even noninformative message :-<

I will do a backup tonight and then try pvmove again. If I get an error I
will surely let you know!

Thank you again!

/ Thomas
.......................................................................
 Thomas Svedberg
 Department of Mathematics
 Chalmers University of Technology

 Address: SE-412 96 Göteborg, SWEDEN
 E-mail : thsv@bigfoot.com, thsv@math.chalmers.se
 Phone  : +46 31 772 5368
 Fax    : +46 31 772 3595
.......................................................................

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

end of thread, other threads:[~2001-09-24 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-23 10:43 [linux-lvm] Lost VG after failed pvmove Thomas Svedberg
2001-09-23 11:28 ` Thomas Svedberg
2001-09-24 10:27 ` Heinz J . Mauelshagen
2001-09-24 11:23   ` Thomas Svedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox