linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Severe bug in kernel-2.4.4 lvm
@ 2001-05-31 10:08 Hadmut Danisch
  2001-05-31 11:43 ` Ed Tomlinson
  0 siblings, 1 reply; 7+ messages in thread
From: Hadmut Danisch @ 2001-05-31 10:08 UTC (permalink / raw)
  To: linux-lvm


Hi,

sorry, if this was discussed before, but 
I'm new on this list.


I just crashed several data file systems
due to a bug in kernel-2.4.4 lvm. (seems
to contain lvm 0.9.1-beta2)

I'd suggest to incorporate latest lvm 
versions into 2.4 kernels. As far as
a collegue told me, lvm's kernel patches
do not work with kernels later than 2.4.3.
So there seems to be no way to fix the bug
with later kernels.


Bug description:

I have to disks, each with one lvm partition.
First disks has volume group A, second one
has volume group B. Volume groups were created
with one of the pre-2.4 kernels and worked
very well so far.

Since a (windows) programm ruined some of the
partitions of the first disk, I was trying to
completely reinstall the first disk. Since
current debian lvm tools don't work properly
with current kernel, I used older 0.9 tools, 
which also worked well so far.

First problem: After creating logical volumes
in VG A, these volumes appeared normaly in 
/dev/A, but accessing was impossible, kernel 
claimed that these are not block devices.
After repeating the procedure and rebooting
it worked.

I've created several logical volumes in 
/dev/A and made reiserfilesystems. I could also 
mount them, but df showed, that some of the
logical volumes were much larger than chosen
when creating the volumes.

I found that even when I created them in 
VG A and they appeared in /dev/A, some of them
were actually logical volumes in VG B.
With making filesystems in the A volumes, I
erased data of some logical volumes in VG B.

(Heavy loss of data).


Any idea how to fix the bug (or to rescue lost
data?)



regards
Hadmut

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
  2001-05-31 10:08 [linux-lvm] Severe bug in kernel-2.4.4 lvm Hadmut Danisch
@ 2001-05-31 11:43 ` Ed Tomlinson
  2001-05-31 17:39   ` Austin Gonyou
  0 siblings, 1 reply; 7+ messages in thread
From: Ed Tomlinson @ 2001-05-31 11:43 UTC (permalink / raw)
  To: linux-lvm

On Thursday 31 May 2001 06:08, you wrote:
> Hi,
>
> sorry, if this was discussed before, but
> I'm new on this list.
>
>
> I just crashed several data file systems
> due to a bug in kernel-2.4.4 lvm. (seems
> to contain lvm 0.9.1-beta2)
>
> I'd suggest to incorporate latest lvm
> versions into 2.4 kernels. As far as
> a collegue told me, lvm's kernel patches
> do not work with kernels later than 2.4.3.
> So there seems to be no way to fix the bug
> with later kernels.

Don't always belive collegues...  LVM 0.91 beta7
and 2.4.5 here.  You need ONE trival patch to fix
things.  Read the archives of the list.

Ed Tomlinson

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
  2001-05-31 11:43 ` Ed Tomlinson
@ 2001-05-31 17:39   ` Austin Gonyou
  0 siblings, 0 replies; 7+ messages in thread
From: Austin Gonyou @ 2001-05-31 17:39 UTC (permalink / raw)
  To: linux-lvm

Here here. Same here as well. LVM 0.9.1b7 kernel 2.4.5 and win4lin.

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: austin@coremetrics.com

On Thu, 31 May 2001, Ed Tomlinson wrote:

> On Thursday 31 May 2001 06:08, you wrote:
> > Hi,
> >
> > sorry, if this was discussed before, but
> > I'm new on this list.
> >
> >
> > I just crashed several data file systems
> > due to a bug in kernel-2.4.4 lvm. (seems
> > to contain lvm 0.9.1-beta2)
> >
> > I'd suggest to incorporate latest lvm
> > versions into 2.4 kernels. As far as
> > a collegue told me, lvm's kernel patches
> > do not work with kernels later than 2.4.3.
> > So there seems to be no way to fix the bug
> > with later kernels.
>
> Don't always belive collegues...  LVM 0.91 beta7
> and 2.4.5 here.  You need ONE trival patch to fix
> things.  Read the archives of the list.
>
> Ed Tomlinson
> _______________________________________________
> 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
>

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
  2001-05-31 15:11 ` Joe Thornber
  2001-05-31 15:52   ` Patrick Caulfield
@ 2001-05-31 16:08   ` Gergely Tamas
  1 sibling, 0 replies; 7+ messages in thread
From: Gergely Tamas @ 2001-05-31 16:08 UTC (permalink / raw)
  To: Joe Thornber; +Cc: linux-lvm, Tamas Gergely

Hi!

 > > ps: just ask because Andrea has a patch with the comment
 > >     'it has some other tons of fixes' for lvm 0.9.1b7 on the
 > >     ftp.kernel.org.
 >
 > I presume he means that beta7 has tons of fixes for the vanilla
 > kernel.  I just had a look at his code and the differences are very
 > small compared to our CVS code (I haven't listed them all here):

Thanks.

Another question, is it safe to use LVM 0.9.1b7 on a production
server. Just thought about this because you are speaking about your CVS
version. And because of the postponing of release 1.0 after the kernel
inclusion.

Are there all nessesary patches listed in the appropriate fragments file?
Just ask because I saw you inserted some additional into the CVS version.

And as far as I remeber, there were some additional patches for the
snapshoot feature (needed to be patched manually against the kernel).

Can you tell me which one(s) these are?

Thanks in advance,
Gergely

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
  2001-05-31 15:11 ` Joe Thornber
@ 2001-05-31 15:52   ` Patrick Caulfield
  2001-05-31 16:08   ` Gergely Tamas
  1 sibling, 0 replies; 7+ messages in thread
From: Patrick Caulfield @ 2001-05-31 15:52 UTC (permalink / raw)
  To: linux-lvm

On Thu, May 31, 2001 at 04:11:55PM +0100, Joe Thornber wrote:
> 
> --- /usr/src/linux/drivers/md/lvm-fs.c  Thu May 31 15:48:03 2001
> +++ /tmp/linux/drivers/md/lvm-fs.c      Thu May 31 15:48:17 2001
> @@ -577,7 +572,7 @@
>         allocation_flag = 'A';
>         if (!(pv->pv_allocatable & PV_ALLOCATABLE))
>                 allocation_flag = 'N';
> -       pv_name = strchr(pv->pv_name+1,'/');
> +       pv_name = strrchr(pv->pv_name+1,'/');
>         if ( pv_name == 0) pv_name = pv->pv_name;
>         else               pv_name++;
>         sz = sprintf(buf,

That one's mine - strchr is right(one r in the middle), otherwise devfs users
just get names like "part1" and "disc"(sic) in /proc/lvm rather than long
device names.

patrick

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
  2001-05-31 14:16 Gergely Tamas
@ 2001-05-31 15:11 ` Joe Thornber
  2001-05-31 15:52   ` Patrick Caulfield
  2001-05-31 16:08   ` Gergely Tamas
  0 siblings, 2 replies; 7+ messages in thread
From: Joe Thornber @ 2001-05-31 15:11 UTC (permalink / raw)
  To: linux-lvm

On Thu, May 31, 2001 at 04:16:45PM +0200, Gergely Tamas wrote:
<snip>

> ps: just ask because Andrea has a patch with the comment
>     'it has some other tons of fixes' for lvm 0.9.1b7 on the
>     ftp.kernel.org.

I presume he means that beta7 has tons of fixes for the vanilla
kernel.  I just had a look at his code and the differences are very
small compared to our CVS code (I haven't listed them all here):

--- /usr/src/linux/drivers/md/lvm-fs.c  Thu May 31 15:48:03 2001
+++ /tmp/linux/drivers/md/lvm-fs.c      Thu May 31 15:48:17 2001
@@ -577,7 +572,7 @@
        allocation_flag = 'A';
        if (!(pv->pv_allocatable & PV_ALLOCATABLE))
                allocation_flag = 'N';
-       pv_name = strchr(pv->pv_name+1,'/');
+       pv_name = strrchr(pv->pv_name+1,'/');
        if ( pv_name == 0) pv_name = pv->pv_name;
        else               pv_name++;
        sz = sprintf(buf,



He also knocked out the __brw_kiovec from lvm-snap, sensible since
this just calls brw_kiovec for 2.4 kernels, and I doubt he's looked at
the 2.2 code.

He uses the 'blocks' array in the iobufs rather than a seperate one,
this saves stack space and is cleaner.

He doesn't lock page before calling brw_kiovec in lvm-snap, (we lock
them on allocation), for a vanilla kernel this means that Andrea's
code will have problems with snapshots.  There's always a chance that
he has a patch for brw_kiovec which moves the LockPage into here.


Debug only bug fix:

--- /usr/src/linux/drivers/md/lvm.c     Thu May 31 15:48:03 2001
+++ /tmp/linux/drivers/md/lvm.c Thu May 31 15:48:17 2001
@@ -1156,7 +1144,7 @@
 
        P_MAP("%s - lvm_map minor: %d  *rdev: %s  *rsector: %lu  size:%lu\n",
              lvm_name, minor,
-             kdevname(bh->b_dev),
+             kdevname(bh->b_rdev),
              rsector_org, size);
 


We have nicer pv move code in cvs that he hasn't picked up yet.


That's about it.


- Joe

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

* Re: [linux-lvm] Severe bug in kernel-2.4.4 lvm
@ 2001-05-31 14:16 Gergely Tamas
  2001-05-31 15:11 ` Joe Thornber
  0 siblings, 1 reply; 7+ messages in thread
From: Gergely Tamas @ 2001-05-31 14:16 UTC (permalink / raw)
  To: linux-lvm

Hi!

 > Don't always belive collegues...  LVM 0.91 beta7
 > and 2.4.5 here.  You need ONE trival patch to fix
 > things.  Read the archives of the list.

Which trivial patch are you talking about ? The get_hardblocksize ->
get_hardsect_size change ?!

Gergely

ps: just ask because Andrea has a patch with the comment
    'it has some other tons of fixes' for lvm 0.9.1b7 on the
    ftp.kernel.org.

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

end of thread, other threads:[~2001-05-31 17:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-31 10:08 [linux-lvm] Severe bug in kernel-2.4.4 lvm Hadmut Danisch
2001-05-31 11:43 ` Ed Tomlinson
2001-05-31 17:39   ` Austin Gonyou
2001-05-31 14:16 Gergely Tamas
2001-05-31 15:11 ` Joe Thornber
2001-05-31 15:52   ` Patrick Caulfield
2001-05-31 16:08   ` Gergely Tamas

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