mdadm: mdrun fails with upstream kernels 2.6.2 and 2.6.3-rc1

Bug #6773 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
mdadm (Debian)
Fix Released
Unknown
mdadm (Ubuntu)
Fix Released
Medium
Fabio Massimo Di Nitto

Bug Description

Automatically imported from Debian bug report #231823
http://bugs.debian.org/231823

Revision history for this message
In , Andre Tomt (andre-tomt) wrote : Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and 2.6.3-rc1

Changing line 39 of /sbin/mdrun from:
if [ -z "$AUTOCREATE" ] && grep " devfs" /proc/filesystems
 >/dev/null 2>&1 && ! grep "^devfs" /proc/mounts >/dev/null 2>&1 ; then

to:
if ! uname -r | grep "2.6" 1>/dev/null && [ -z "$AUTOCREATE" ] && grep "
        devfs" /proc/filesystems >/dev/null 2>&1 && ! grep "^devfs"
/proc/mounts >/dev/null 2>&1 ; then

Fixed the problem.. Most likely not the right fix, but it pretty much
tells whats going on ;-)

ie, /proc/partitions is not devfs-munged with devfs compiled in with
2.6, or something..

Revision history for this message
In , Adrian Bunk (bunk-fs) wrote : Making this bug RC

severity 231823 grave
thanks

This bug has a serious impact on several kernel 2.6 users, and a way how
to colve it was already proposed by the submitter.

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Revision history for this message
In , Andre Tomt (andre-tomt) wrote : Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and, 2.6.3-rc1

Ping.

Revision history for this message
In , Mario Joußen (mario-joussen) wrote :

On Sat, Jun 05, 2004 at 09:02:01PM +0200, Andre Tomt wrote:
> Ping.

Pong. :-)

I'm still waiting for a reaction from Eduard Bloch. I hope that he will
provide a fix for this problem.

Cheers, Mario

--
                                      ,,,
                   Mario Joußen (o o) <email address hidden>
+--------------------------------oOO--(_)--OOo--------------------------------+
  "I WILL STOP TALKING ABOUT THE TWELVE INCH PIANIST" -- Bart Simpson in 3F07

Revision history for this message
In , Eduard Bloch (edi-gmx) wrote :

#include <hallo.h>
* Mario Joussen [Thu, Jun 10 2004, 07:55:16PM]:

> Pong. :-)
>
> I'm still waiting for a reaction from Eduard Bloch. I hope that he will
> provide a fix for this problem.

I don't have a strong opinion, I have no time or motivation to work on
it and I forgot most things about the internals. If you have a working
fix, use it.

Side comment:

I remember that I used some workarounds to simulate arrays in the POSIX
shell syntax. Since Herbert did not want to use mdrun, I do not see why
not switch to use bash extensions... so if somebody is going to rewrite
mdrun or so, consider this.

Eduard.
--
<Aquariophile> Aber wofuer kann ich dann einen MBR gekauft?

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #231823
http://bugs.debian.org/231823

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (4.4 KiB)

Message-Id: <email address hidden>
Date: Mon, 09 Feb 2004 04:05:43 +0100
From: Andre Tomt <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: mdadm: mdrun fails with upstream kernels 2.6.2 and 2.6.3-rc1

Package: mdadm
Version: 1.3.0-2
Severity: important

mdrun fails to autostart the arrays when using kernel 2.6.2 and 2.6.3-rc1. it
just exits with no errors, with no arrays started. kernel has devfs compiled in,
but not mounted after the initrd is done running.

I suspect it is because /proc/partitions is different from 2.4+devfs (but not
mounted there either)

2.6 /proc/partitions

major minor #blocks name

   1 0 4096 ram0
   1 1 4096 ram1
   1 2 4096 ram2
   1 3 4096 ram3
   1 4 4096 ram4
   1 5 4096 ram5
   1 6 4096 ram6
   1 7 4096 ram7
   1 8 4096 ram8
   1 9 4096 ram9
   1 10 4096 ram10
   1 11 4096 ram11
   1 12 4096 ram12
   1 13 4096 ram13
   1 14 4096 ram14
   1 15 4096 ram15
   3 0 16511040 hda
   3 1 999904 hda1
   3 2 1 hda2
   3 5 4992088 hda5
   3 6 10518952 hda6
  33 0 117220824 hde
  33 1 2996091 hde1
  33 2 1 hde2
  33 5 114222118 hde5
  34 0 117220824 hdg
  34 1 2971993 hdg1
  34 2 1 hdg2
  34 5 114246216 hdg5
  56 0 30018240 hdi
  56 1 1 hdi1
  56 5 995967 hdi5
  56 6 995998 hdi6
  56 7 1004031 hdi7
  56 8 4996183 hdi8
  56 9 10522543 hdi9
  56 10 11502508 hdi10
   9 0 999808 md0
   9 2 10518848 md2
   9 1 4992000 md1
 254 0 234430464 dm-0

2.4 /proc/partitions

major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

  56 0 30018240 ide/host4/bus0/target0/lun0/disc 2889 3962 53176 16740 604 1779 19312 15810 -1 112760 42859352
  56 1 1 ide/host4/bus0/target0/lun0/part1 2 0 4 0 0 0 0 0 0 0 0
  56 5 995967 ide/host4/bus0/target0/lun0/part5 4 2 48 60 0 0 0 0 0 60 60
  56 6 995998 ide/host4/bus0/target0/lun0/part6 4 2 48 30 0 0 0 0 0 30 30
  56 7 1004031 ide/host4/bus0/target0/lun0/part7 1927 3734 45108 9710 285 901 9592 7260 0 9080 16970
  56 8 4996183 ide/host4/bus0/target0/lun0/part8 901 95 7428 6130 300 863 9472 8540 0 6760 14670
  56 9 10522543 ide/host4/bus0/target0/lun0/part9 38 82 420 580 19 15 248 10 0 590 590
  56 10 11502508 ide/host4/bus0/target0/lun0/part10 3 13 32 50 0 0 0 0 0 50 50
  34 0 117220824 ide/host2/bus1/target0/lun0/disc 168 85 614 80 3 0 24 0 -3 122920 42581012
  34 1 2971993 ide/host2/bus1/target0/lun0/part1 71 33 208 20 0 0 0 0 0 20 20
  34 2 1 ide/host2/bus1/target0/lun0/part2 2 0 4 0 0 0 0 0 0 0 0
  34 5 114246216 ide/host2/bus1/target0/lun0/part5 90 33 354 30 3 0 24 0 0 30 30
  33 0 117220824 ide/host2/bus0/target0/lun0/disc 149 85 468 120 0 0 0 0 -2 122920 42703952
  33 1 2996091 ide/host2/bus0/target0/lun0/part1 71 33 208 20 0 0 0 0 0 20 20
  33 2 1 ide/host2/bus0/ta...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 09 Feb 2004 05:30:27 +0100
From: Andre Tomt <email address hidden>
To: <email address hidden>
Subject: Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and
 2.6.3-rc1

Changing line 39 of /sbin/mdrun from:
if [ -z "$AUTOCREATE" ] && grep " devfs" /proc/filesystems
 >/dev/null 2>&1 && ! grep "^devfs" /proc/mounts >/dev/null 2>&1 ; then

to:
if ! uname -r | grep "2.6" 1>/dev/null && [ -z "$AUTOCREATE" ] && grep "
        devfs" /proc/filesystems >/dev/null 2>&1 && ! grep "^devfs"
/proc/mounts >/dev/null 2>&1 ; then

Fixed the problem.. Most likely not the right fix, but it pretty much
tells whats going on ;-)

ie, /proc/partitions is not devfs-munged with devfs compiled in with
2.6, or something..

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 16 May 2004 00:53:06 +0200
From: Adrian Bunk <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Making this bug RC

severity 231823 grave
thanks

This bug has a serious impact on several kernel 2.6 users, and a way how
to colve it was already proposed by the submitter.

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 05 Jun 2004 21:02:01 +0200
From: Andre Tomt <email address hidden>
To: <email address hidden>
Subject: Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and,
 2.6.3-rc1

Ping.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 10 Jun 2004 19:55:16 +0200
From: Mario Joussen <email address hidden>
To: Andre Tomt <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and,
 2.6.3-rc1

On Sat, Jun 05, 2004 at 09:02:01PM +0200, Andre Tomt wrote:
> Ping.

Pong. :-)

I'm still waiting for a reaction from Eduard Bloch. I hope that he will
provide a fix for this problem.

Cheers, Mario

--
                                      ,,,
                   Mario Jou�n (o o) <email address hidden>
+--------------------------------oOO--(_)--OOo--------------------------------+
  "I WILL STOP TALKING ABOUT THE TWELVE INCH PIANIST" -- Bart Simpson in 3F07

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 17 Jun 2004 01:25:01 +0200
From: Eduard Bloch <email address hidden>
To: Mario Joussen <email address hidden>
Cc: Andre Tomt <email address hidden>, <email address hidden>
Subject: Re: Bug#231823: mdadm: mdrun fails with upstream kernels 2.6.2 and,
 2.6.3-rc1

#include <hallo.h>
* Mario Joussen [Thu, Jun 10 2004, 07:55:16PM]:

> Pong. :-)
>
> I'm still waiting for a reaction from Eduard Bloch. I hope that he will
> provide a fix for this problem.

I don't have a strong opinion, I have no time or motivation to work on
it and I forgot most things about the internals. If you have a working
fix, use it.

Side comment:

I remember that I used some workarounds to simulate arrays in the POSIX
shell syntax. Since Herbert did not want to use mdrun, I do not see why
not switch to use bash extensions... so if somebody is going to rewrite
mdrun or so, consider this.

Eduard.
--
<Aquariophile> Aber wofuer kann ich dann einen MBR gekauft?

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Created an attachment (id=4)
fix debbug 231823

This is the same kludge/fix as described in the bug report. It seems to work
fine on both 2.4 and 2.6 kernels with devfs compiled but not mounted.

There is only one important limitation but there is no workaround that i know
of. It relies on uname -r or /proc/version.
So a crafted kernel version might makes this script useless but not dangerous.
The same problem affects debian

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

(From update of attachment 4)
wrong patch

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Created an attachment (id=5)
fix debbug 231823

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Created an attachment (id=6)
Still fix 231823

This patch is the correct one. Same concepts as the others but it ensure to
match only major kernel versions.

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

package has been uploaded to warty as mdadm_1.5.0-2ubuntu1

Revision history for this message
In , Fabio Massimo Di Nitto (fabbione) wrote : patch

tag 231823 patch
stop

Hi,
 a patch to fix this bug, based on the previous information can be
found here:

http://we.give.back.to.debian.even.if.we.have.no-name-yet.com/patches/mdadm.231823.diff

It has been tested and known to work both for 2.6 and 2.4 kernels.
The only difference with the suggested patch is to match for ^2.6 instead
of 2.6.

Thanks
Fabio

--
<user> fajita: step one
<fajita> Whatever the problem, step one is always to look in the error log.
<user> fajita: step two
<fajita> When in danger or in doubt, step two is to scream and shout.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 5 Jul 2004 12:44:33 +0200 (CEST)
From: Fabio Massimo Di Nitto <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: patch

tag 231823 patch
stop

Hi,
 a patch to fix this bug, based on the previous information can be
found here:

http://we.give.back.to.debian.even.if.we.have.no-name-yet.com/patches/mdadm.231823.diff

It has been tested and known to work both for 2.6 and 2.4 kernels.
The only difference with the suggested patch is to match for ^2.6 instead
of 2.6.

Thanks
Fabio

--
<user> fajita: step one
<fajita> Whatever the problem, step one is always to look in the error log.
<user> fajita: step two
<fajita> When in danger or in doubt, step two is to scream and shout.

Revision history for this message
In , Albert-sedifa (albert-sedifa) wrote : Report working patch

I had the same problem and the patch by fabbione works correctly for me with
kernel image 2.6.6-1-686-smp on sarge

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 14 Jul 2004 09:57:38 +0200
From: <email address hidden>
To: <email address hidden>
Subject: Report working patch

I had the same problem and the patch by fabbione works correctly for me wit=
h=20
kernel image 2.6.6-1-686-smp on sarge

=20

Revision history for this message
In , Frank Lichtenheld (djpig) wrote : tagging 231823

 # NMU uploaded to DELAYED/3
tag 231823 pending

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 18 Jul 2004 23:30:28 +0200
From: Frank Lichtenheld <email address hidden>
To: <email address hidden>
Subject: tagging 231823

 # NMU uploaded to DELAYED/3
tag 231823 pending

Revision history for this message
In , Mario Joussen (joussen) wrote : Bug#231823: fixed in mdadm 1.6.0-1

Source: mdadm
Source-Version: 1.6.0-1

We believe that the bug you reported is fixed in the latest version of
mdadm, which is due to be installed in the Debian FTP archive:

mdadm-udeb_1.6.0-1_i386.udeb
  to pool/main/m/mdadm/mdadm-udeb_1.6.0-1_i386.udeb
mdadm_1.6.0-1.diff.gz
  to pool/main/m/mdadm/mdadm_1.6.0-1.diff.gz
mdadm_1.6.0-1.dsc
  to pool/main/m/mdadm/mdadm_1.6.0-1.dsc
mdadm_1.6.0-1_i386.deb
  to pool/main/m/mdadm/mdadm_1.6.0-1_i386.deb
mdadm_1.6.0.orig.tar.gz
  to pool/main/m/mdadm/mdadm_1.6.0.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mario Joussen <email address hidden> (supplier of updated mdadm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 20 Jul 2004 21:40:33 +0200
Source: mdadm
Binary: mdadm mdadm-udeb
Architecture: source i386
Version: 1.6.0-1
Distribution: unstable
Urgency: low
Maintainer: Mario Joussen <email address hidden>
Changed-By: Mario Joussen <email address hidden>
Description:
 mdadm - Manage MD devices aka Linux Software Raid
 mdadm-udeb - Manage MD devices aka Linux Software Raid (udeb)
Closes: 231823 250792 253339 257357
Changes:
 mdadm (1.6.0-1) unstable; urgency=low
 .
   * New upstream release.
     Detect degraded arrays in --monitor mode now.
     (closes: Bug#257357)
   * Changed default to autostart RAID array.
     (closes: Bug#250792)
   * Fixed mdrun problem with kernel 2.6.
     Thanks to Andre Tomt <email address hidden> and Fabio Massimo Di Nitto
     <email address hidden>
     (closes: Bug#231823)
   * Changed reuse warning to be less misleading.
     (closes: Bug#253339)
Files:
 6925d616c82695e8775b2fb2c9d81ae6 610 admin optional mdadm_1.6.0-1.dsc
 49b6f89709d95f103ca7c8fd83986c16 114172 admin optional mdadm_1.6.0.orig.tar.gz
 1e3ee69b922b066efcae9034bc449681 23918 admin optional mdadm_1.6.0-1.diff.gz
 a83bd43afff4f98d08ce2a5ce0d8c207 86372 admin optional mdadm_1.6.0-1_i386.deb
 668f43bc6ca24e4a0b7a6ee7699aea4b 38362 debian-installer optional mdadm-udeb_1.6.0-1_i386.udeb
package-type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFA/ZWCMHtSKdKmuBARAn8dAJ9PXM8ITPsBLmS9F3BYtOZTlLSsOACg3SkN
qRWh/5742HTs7bY43tyZyg4=
=SG1Y
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Tue, 20 Jul 2004 18:17:16 -0400
From: Mario Joussen <email address hidden>
To: <email address hidden>
Subject: Bug#231823: fixed in mdadm 1.6.0-1

Source: mdadm
Source-Version: 1.6.0-1

We believe that the bug you reported is fixed in the latest version of
mdadm, which is due to be installed in the Debian FTP archive:

mdadm-udeb_1.6.0-1_i386.udeb
  to pool/main/m/mdadm/mdadm-udeb_1.6.0-1_i386.udeb
mdadm_1.6.0-1.diff.gz
  to pool/main/m/mdadm/mdadm_1.6.0-1.diff.gz
mdadm_1.6.0-1.dsc
  to pool/main/m/mdadm/mdadm_1.6.0-1.dsc
mdadm_1.6.0-1_i386.deb
  to pool/main/m/mdadm/mdadm_1.6.0-1_i386.deb
mdadm_1.6.0.orig.tar.gz
  to pool/main/m/mdadm/mdadm_1.6.0.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mario Joussen <email address hidden> (supplier of updated mdadm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 20 Jul 2004 21:40:33 +0200
Source: mdadm
Binary: mdadm mdadm-udeb
Architecture: source i386
Version: 1.6.0-1
Distribution: unstable
Urgency: low
Maintainer: Mario Joussen <email address hidden>
Changed-By: Mario Joussen <email address hidden>
Description:
 mdadm - Manage MD devices aka Linux Software Raid
 mdadm-udeb - Manage MD devices aka Linux Software Raid (udeb)
Closes: 231823 250792 253339 257357
Changes:
 mdadm (1.6.0-1) unstable; urgency=low
 .
   * New upstream release.
     Detect degraded arrays in --monitor mode now.
     (closes: Bug#257357)
   * Changed default to autostart RAID array.
     (closes: Bug#250792)
   * Fixed mdrun problem with kernel 2.6.
     Thanks to Andre Tomt <email address hidden> and Fabio Massimo Di Nitto
     <email address hidden>
     (closes: Bug#231823)
   * Changed reuse warning to be less misleading.
     (closes: Bug#253339)
Files:
 6925d616c82695e8775b2fb2c9d81ae6 610 admin optional mdadm_1.6.0-1.dsc
 49b6f89709d95f103ca7c8fd83986c16 114172 admin optional mdadm_1.6.0.orig.tar.gz
 1e3ee69b922b066efcae9034bc449681 23918 admin optional mdadm_1.6.0-1.diff.gz
 a83bd43afff4f98d08ce2a5ce0d8c207 86372 admin optional mdadm_1.6.0-1_i386.deb
 668f43bc6ca24e4a0b7a6ee7699aea4b 38362 debian-installer optional mdadm-udeb_1.6.0-1_i386.udeb
package-type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFA/ZWCMHtSKdKmuBARAn8dAJ9PXM8ITPsBLmS9F3BYtOZTlLSsOACg3SkN
qRWh/5742HTs7bY43tyZyg4=
=SG1Y
-----END PGP SIGNATURE-----

Revision history for this message
Daniel Robitaille (robitaille) wrote :

Fixed in Debian in July 2004

Changed in mdadm:
status: Unconfirmed → Fix Released
Changed in mdadm:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.