linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] made a big misstake
@ 2000-07-18 21:15 Erik Bågfors
  2000-07-18 23:14 ` [linux-lvm] Fresh install Bruno Kraychete da Costa
       [not found] ` <200007182302.e6IN2m930146@webber.adilger.net>
  0 siblings, 2 replies; 6+ messages in thread
From: Erik Bågfors @ 2000-07-18 21:15 UTC (permalink / raw)
  To: linux-lvm

Hi!

I just installed a new computer the other day and since I'm a long time
aix-user and love there lvm-system I installed the linux-lvm.

So far I am VERY impressed.  I've tried resizeing and moving end extending
and all kinds of stuff and everything worked!! Good work!!!


However I screwed up today.  
I had one vg (disk_vg) that was on two pv's (hda5 and hdb1).  I wanted to
remove one of them and did a pvmove and could see that the pv I wanted to
remove was empty.  Great!

Now the misstake, I did not run a vgreduce before I fdisk'ed the whole 
disk (hdb).  Now when I start up, vgscan cannot find any vg's.

all the vg*-utilities say they cannot find any vg's.

pvdisplay shows my vg on the pv but it's also on another pv :(

pvscan says 'inactive PV "/dev/hda5" is associated to an unknown VG (run
vgscan)'

I was thinking that creating a new pv (on /dev/hdb1) and running 
vgcfgrestore -n disk_vg /dev/hdb1 would help me get it back but it just
say that "size of physical volume /dev/hdb1 differs from backup" and I
cannot remember what size I had last time.

Is ther any way of finding that out?

There is nothing important on this box but it would be fun not having to
reinstall it!

So.. anyone knows how to solve this?  Sorry I don't have better output from
my commands but it's hard since the network is not working on it right now :)

/Erik

-- 
Erik B�gfors               | Center for Parallel Computers
http://erik.bagfors.nu/    | http://www.pdc.kth.se/
erik@bagfors.nu            | bagfors@pdc.kth.se  
Supporter of free software | GSM +46 70 398 54 43 

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

* [linux-lvm] Fresh install
  2000-07-18 21:15 [linux-lvm] made a big misstake Erik Bågfors
@ 2000-07-18 23:14 ` Bruno Kraychete da Costa
       [not found] ` <200007182302.e6IN2m930146@webber.adilger.net>
  1 sibling, 0 replies; 6+ messages in thread
From: Bruno Kraychete da Costa @ 2000-07-18 23:14 UTC (permalink / raw)
  To: linux-lvm


Hi there,

I'm about to install a new Linux box (probably Slackware 7.1) and I'd like
to use LVM on it. Is there any way to install Salackware 7.1 (which is a
LVM-unaware distribution) in my machine having it use VGs and LVs? 

Explaining: if I do a clean install, I'll have to install LVM after and
move the contents from normal partitions to the new LVs. What I'd like to
do is to user a LVM-aware bootdisk before installing, so I could prepare
the disk before Slackware setup takes place.

Do you guys know of any such "boot disk"?

Thanks,

Brunokc.

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

* Re: [linux-lvm] made a big misstake
       [not found] ` <200007182302.e6IN2m930146@webber.adilger.net>
@ 2000-07-19  7:51   ` Erik Bågfors
  0 siblings, 0 replies; 6+ messages in thread
From: Erik Bågfors @ 2000-07-19  7:51 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Erik Bågfors, linux-lvm

On Tue, Jul 18, 2000 at 05:02:47PM -0600, Andreas Dilger wrote:
> Erik writes:
> > I just installed a new computer the other day and since I'm a long time
> > aix-user and love there lvm-system I installed the linux-lvm.
> > 
> > So far I am VERY impressed.  I've tried resizeing and moving end extending
> > and all kinds of stuff and everything worked!! Good work!!!
> 
> Online resize and move, or offline?  I'm not sure if online moving of PEs
> is really safe if the filesystem is being used.  Of course, it is safe if
> the PE doesn't change while it is being moved...

The resize was done offline but the move was online.  But I didn't use the
box while doing it so I don't thing there is any danger there.

> > Now the misstake, I did not run a vgreduce before I fdisk'ed the whole 
> > disk (hdb).  Now when I start up, vgscan cannot find any vg's.
> 
> Was hdb1 the first PV created in the VG?  The problem, I think, is that
> Linux LVM only keeps the VGDA on the first PV.  AIX will keep a VGDA
> copy on all of the PVs, and even will keep 2 VGDAs on the first PV for
> backup, in case the first one is corrupt.

Ahh..
No.. hdb1 was not the first PV in the VG.  So I should be safe since it was
hdb1 I removed.

> > So.. anyone knows how to solve this?  Sorry I don't have better output from
> > my commands but it's hard since the network is not working on it right now :)
> 
> Sorry, I don't know enough about how the VGDA backups are stored.  You may
> be able to examine the VGDA backup to find the old size of /dev/hdb1 and
> then restore it, but otherwise I'm not sure what you can do.

That's what I was thinking too but it's in a binary format I know nothing
about.

> I think Linux LVM needs to be updated to keep VGDA backups on all disks
> instead of in the filesystem, exactly for reasons like this.  Right now,
> if the first disk fails, then you are unable to access any LVs that are
> wholly on another disk.  This is bad.

Agreed.

/Erik
-- 
Erik B�gfors               | Center for Parallel Computers
http://erik.bagfors.nu/    | http://www.pdc.kth.se/
erik@bagfors.nu            | bagfors@pdc.kth.se  
Supporter of free software | GSM +46 70 398 54 43 

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

* Re: [linux-lvm] made a big misstake
  2000-07-19  4:19 ` Michael Marxmeier
@ 2000-07-19  5:20   ` Andreas Dilger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Dilger @ 2000-07-19  5:20 UTC (permalink / raw)
  To: Michael Marxmeier; +Cc: linux-lvm, bagfors

Michael writes:
> Andreas Dilger wrote:
> > Was hdb1 the first PV created in the VG?  The problem, I think, is that
> > Linux LVM only keeps the VGDA on the first PV.  AIX will keep a VGDA
> > copy on all of the PVs, and even will keep 2 VGDAs on the first PV for
> > backup, in case the first one is corrupt.
> 
> Actually, LVM should have a copy of the dscriptor area. It is kept in
> the file system in the directory /etc/lvmconf which even has the nice
> property that you can back it up. The VGDA is implecitely backed up by 
> most LVM  commands. 
> 
> You should be able to restore them with vgcfgrestore.
> The vgcfgrestore syntax seems to sugest you can even restore it
> to another physical volume (no tested, personally) which would
> solve the actual problem nicely.

Unfortunately, I didn't quote all of the original message.  One part you
must have missed from the original posting:

> > Eric writes:
> > > I was thinking that creating a new pv (on /dev/hdb1) and running 
> > > vgcfgrestore -n disk_vg /dev/hdb1 would help me get it back but it just
> > > say that "size of physical volume /dev/hdb1 differs from backup" and I
> > > cannot remember what size I had last time

So vgcfgrestore is not useful in this case, since it can't be restored to
the new partition or to the other PV in the VG.  Having a VGDA on each PV
in a VG would solve this problem.  It would also fix the major problem
that would happen if the VGDA for the root filesystem/VG is corrupt - you
cannot access the VGDA backups in /etc/lvmconf in this case at all, and
even a rescue disk will not help you because the VG layout is not known.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

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

* Re: [linux-lvm] made a big misstake
       [not found] <200007182303.TAA20264@e35.marxmeier.com>
@ 2000-07-19  4:19 ` Michael Marxmeier
  2000-07-19  5:20   ` Andreas Dilger
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Marxmeier @ 2000-07-19  4:19 UTC (permalink / raw)
  To: linux-lvm, bagfors

Andreas Dilger wrote:
> Erik writes:
> > Now the misstake, I did not run a vgreduce before I fdisk'ed the whole
> > disk (hdb).  Now when I start up, vgscan cannot find any vg's.
> 
> Was hdb1 the first PV created in the VG?  The problem, I think, is that
> Linux LVM only keeps the VGDA on the first PV.  AIX will keep a VGDA
> copy on all of the PVs, and even will keep 2 VGDAs on the first PV for
> backup, in case the first one is corrupt.

Actually, LVM should have a copy of the dscriptor area. It is kept in
the file system in the directory /etc/lvmconf which even has the nice
property that you can back it up. The VGDA is implecitely backed up by 
most LVM  commands. 

You should be able to restore them with vgcfgrestore.
The vgcfgrestore syntax seems to sugest you can even restore it
to another physical volume (no tested, personally) which would
solve the actual problem nicely.


Hope this helps
Michael

-- 
Michael Marxmeier           Marxmeier Software AG
E-Mail: mike@msede.com      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/

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

* Re: [linux-lvm] made a big misstake
@ 2000-07-19  4:05 Michael Marxmeier
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Marxmeier @ 2000-07-19  4:05 UTC (permalink / raw)
  To: linux-lvm

Forwarded message from Andreas Dilger ...

-------- Original Message --------
From: Andreas Dilger <adilger@turbolinux.com>
Message-Id: <200007182302.e6IN2m930146@webber.adilger.net>
Subject: Re: [linux-lvm] made a big misstake
In-Reply-To: <20000718231557.B13413@zyrgelkwyt.pdc.kth.se>
=?ISO-8859-1?Q?from_Erik_B=E5gfors_at_Jul_18=2C_2000_11=3A15=3A57_pm?=
To: =?ISO-8859-1?Q?Erik_B=E5gfors?= <bagfors@pdc.kth.se>
Date: Tue, 18 Jul 2000 17:02:47 -0600 (MDT)
CC: linux-lvm@msede.com
X-Mailer: ELM [version 2.4ME+ PL73 (25)]
MIME-Version: 1.0

Erik writes:
> I just installed a new computer the other day and since I'm a long time
> aix-user and love there lvm-system I installed the linux-lvm.
> 
> So far I am VERY impressed.  I've tried resizeing and moving end extending
> and all kinds of stuff and everything worked!! Good work!!!

Online resize and move, or offline?  I'm not sure if online moving of
PEs
is really safe if the filesystem is being used.  Of course, it is safe
if
the PE doesn't change while it is being moved...

> Now the misstake, I did not run a vgreduce before I fdisk'ed the whole 
> disk (hdb).  Now when I start up, vgscan cannot find any vg's.

Was hdb1 the first PV created in the VG?  The problem, I think, is
that
Linux LVM only keeps the VGDA on the first PV.  AIX will keep a VGDA
copy on all of the PVs, and even will keep 2 VGDAs on the first PV for
backup, in case the first one is corrupt.

> So.. anyone knows how to solve this?  Sorry I don't have better output from
> my commands but it's hard since the network is not working on it right now :)

Sorry, I don't know enough about how the VGDA backups are stored.  You
may
be able to examine the VGDA backup to find the old size of /dev/hdb1
and
then restore it, but otherwise I'm not sure what you can do.

I think Linux LVM needs to be updated to keep VGDA backups on all
disks
instead of in the filesystem, exactly for reasons like this.  Right
now,
if the first disk fails, then you are unable to access any LVs that
are
wholly on another disk.  This is bad.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of
antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               --
Dogbert

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

end of thread, other threads:[~2000-07-19  7:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-18 21:15 [linux-lvm] made a big misstake Erik Bågfors
2000-07-18 23:14 ` [linux-lvm] Fresh install Bruno Kraychete da Costa
     [not found] ` <200007182302.e6IN2m930146@webber.adilger.net>
2000-07-19  7:51   ` [linux-lvm] made a big misstake Erik Bågfors
2000-07-19  4:05 Michael Marxmeier
     [not found] <200007182303.TAA20264@e35.marxmeier.com>
2000-07-19  4:19 ` Michael Marxmeier
2000-07-19  5:20   ` Andreas Dilger

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