All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Overlapping logical volumes
@ 2003-11-01  0:10 Tom Parker
  2003-11-03  4:11 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Parker @ 2003-11-01  0:10 UTC (permalink / raw)
  To: linux-lvm

Hi,

I have just experianced a rather nasty bug in lvextend. I grew a logical
volume and it used extents that were already in use for another logical
volume.

I'm using Debian Woody and Linux 2.4.22 (unpatched Linus kernel.org sources)

amislave:/# lvextend --help

Logical Volume Manager 1.0.4
Heinz Mauelshagen, Sistina Software  02/05/2002 (IOP 10)

Luckily I noticed the corrupting filesystems fairly quickly and was able to
mostly recover the situation with minimal losses. Currently I still have the
two overlapping logical volumes and a lot less trust in the LVM than I had
before.

Is there a program that can validate the logical volume configuration and
ensure that no physical extent is allocated to more the one logical volume?

When extending a logical volume, or creating a new one, is anything written to
the newly allocated extents? If this were to happen again, and I discovered
the problem before I made use of the extra space or a new logical volume,
would I have any corruption of the first logical volume to use the extents in
question?

To finish my data recovery, I would like to allocate another large logical
volume, I'm somewhat wary of doing this without a tool to ensure that the
group is valid.

--
Tom Parker - tom@carrott.org
           - http://www.carrott.org

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

* Re: [linux-lvm] Overlapping logical volumes
  2003-11-01  0:10 [linux-lvm] Overlapping logical volumes Tom Parker
@ 2003-11-03  4:11 ` Heinz J . Mauelshagen
  2003-11-03  5:33   ` Tom Parker
  0 siblings, 1 reply; 3+ messages in thread
From: Heinz J . Mauelshagen @ 2003-11-03  4:11 UTC (permalink / raw)
  To: linux-lvm

On Sat, Nov 01, 2003 at 07:07:53PM +1200, Tom Parker wrote:
> Hi,
> 
> I have just experianced a rather nasty bug in lvextend. I grew a logical
> volume and it used extents that were already in use for another logical
> volume.

You're the first reporting.
Do you have abn archive copy in /etc/lvmconf representing that situation still ?
If so, send it to me please <mge@sistina.com>.

> 
> I'm using Debian Woody and Linux 2.4.22 (unpatched Linus kernel.org sources)
> 
> amislave:/# lvextend --help
> 
> Logical Volume Manager 1.0.4
> Heinz Mauelshagen, Sistina Software  02/05/2002 (IOP 10)
> 
> Luckily I noticed the corrupting filesystems fairly quickly and was able to
> mostly recover the situation with minimal losses. Currently I still have the
> two overlapping logical volumes and a lot less trust in the LVM than I had
> before.
> 
> Is there a program that can validate the logical volume configuration and
> ensure that no physical extent is allocated to more the one logical volume?

vgck

> 
> When extending a logical volume, or creating a new one, is anything written to
> the newly allocated extents?

While extending, the answer is no.
If creating, the answer is ye, unless you "lvcreate -Zn ...".

> If this were to happen again, and I discovered
> the problem before I made use of the extra space or a new logical volume,
> would I have any corruption of the first logical volume to use the extents in
> question?

As said, use "lvcreate -Zn ..." in order to avoid writing zerores to the first
KB of the new LV (this is necessary because fs mounts can crash your system
otherwise on an un'fscked LV).

> 
> To finish my data recovery, I would like to allocate another large logical
> volume, I'm somewhat wary of doing this without a tool to ensure that the
> group is valid.

Do an "lvcreate -Zn ...", run vgck and check the "lvdisplay -v ..." output
on all your LVs if there's any overlaps again. If so, that's the archive copy
you want to send to me.

> 
> --
> Tom Parker - tom@carrott.org
>            - http://www.carrott.org
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

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

* Re: [linux-lvm] Overlapping logical volumes
  2003-11-03  4:11 ` Heinz J . Mauelshagen
@ 2003-11-03  5:33   ` Tom Parker
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Parker @ 2003-11-03  5:33 UTC (permalink / raw)
  To: Heinz J . Mauelshagen

Heinz J . Mauelshagen <mauelshagen@sistina.com> wrote:

>On Sat, Nov 01, 2003 at 07:07:53PM +1200, Tom Parker wrote:

>> I have just experianced a rather nasty bug in lvextend. I grew a logical
>> volume and it used extents that were already in use for another logical
>> volume.

>You're the first reporting.
>Do you have abn archive copy in /etc/lvmconf representing that situation
>still ? If so, send it to me please <mge@sistina.com>.

I hope I'm not imagining things as I can't reproduce it anymore. It would
appear that I don't currently have any overlapping volumes. I've rebooted
twice since the original incident, and I only have on disk copies of
intermediate files from my original analysis (I had to process the output of
lvdisplay -v with cut and sort and uniq to find the problem, it would be
easier if you provided an easily meachine readable format for lvdisplay -v).
The output of lvdisplay on the effected volumes would appear to be different
from that captured in my intermediate files, however I cannot be 100% certain
I didn't make a mistake and cut at the wrong place or something.

However I'm pritty sure I'm not imagining it. I recall lvdisplay -v reported
all extents allocated from one physical volume, and pvdisplay -v on that
volume showed not as many extents allocated to the logical volume as lvdisplay
did.

The old root logical volume no longer mounts, this logical volume was in use
last week and even remounted after a reboot when I didn't switch onto a new
root correctly.

I'll send you the /etc/lvmconf files from around the incident and hopefully
one of them will show the problem.

>> Is there a program that can validate the logical volume configuration and
>> ensure that no physical extent is allocated to more the one logical volume?

>vgck

This claims my current configuration is good. Is there a way to run it on old
config files?

>Do an "lvcreate -Zn ...", run vgck and check the "lvdisplay -v ..." output
>on all your LVs if there's any overlaps again. If so, that's the archive copy
>you want to send to me.

I'll bear this in mind.

--
Tom Parker - tom@carrott.org
           - http://www.carrott.org

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

end of thread, other threads:[~2003-11-03  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-01  0:10 [linux-lvm] Overlapping logical volumes Tom Parker
2003-11-03  4:11 ` Heinz J . Mauelshagen
2003-11-03  5:33   ` Tom Parker

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.