[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#597969: marked as done (initramfs-tools: md device detection does not work with large numbers of md devices)



Your message dated Fri, 24 Sep 2010 17:11:42 +0000
with message-id <20100924171141.GE5947@vostochny.stro.at>
and subject line Re: Bug#597969: initramfs-tools: md device detection does not work with large numbers of md devices
has caused the Debian Bug report #597969,
regarding initramfs-tools: md device detection does not work with large numbers of md devices
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
597969: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597969
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.92o
Severity: important

When updating a kernel on a lenny system recently we saw the following
messages:

update-initramfs: Generating /boot/initrd.img-2.6.26-2-xen-amd64
mkinitramfs: missing raid root /dev/mapper/local0-sys.root /sys entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-2.6.26-2-xen-amd64

This was caused by a sequence of bugs, of which this describes the
first (and easiest to fix)

On line 259 of /usr/share/initramfs-tools/hook-functions is found:

block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
                                /proc/mdstat)

In this case, this command found not md1, as desired, but md11.

The full line found was:

md11 : active (auto-read-only) raid1 sdm1[0] sdn1[1]

This is easily fixed with the following patch:

--- /usr/share/initramfs-tools/hook-functions   2008-12-18 16:41:11.000000000 +0000
+++ hook-functions      2010-09-23 17:31:56.000000000 +0100
@@ -256,7 +256,7 @@
                fi
# lvm on md or luks on md
                if [ "${block#md}" != "${block}" ]; then
-                       block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
+                       block=$(awk "/^${block} /{print substr(\$5, 1, 4); exit}" \
                                /proc/mdstat)
                fi
                block=${block%[0-9]*}


Subsequent bugs which were exposed by this one:

2) In this case md11 is marked auto-read-only (because it has not been
written to) which means that the fifth column is not a component device
name, but the raid level
3) the substr use here would presumably break discovery of component
devices with something other than exactly four characters.

but I'm not sure it's worth filing separate bugs for them, especially
since it looks like it's all changed in sid/sqeeze.



--- End Message ---
--- Begin Message ---
Version: 0.96.1

On Fri, Sep 24, 2010 at 05:41:30PM +0100, Dominic Hargreaves wrote:
> Version: 0.92o
> Severity: important
> 
> When updating a kernel on a lenny system recently we saw the following
> messages:
> 
> update-initramfs: Generating /boot/initrd.img-2.6.26-2-xen-amd64
> mkinitramfs: missing raid root /dev/mapper/local0-sys.root /sys entry
> mkinitramfs: workaround is MODULES=most
> mkinitramfs: Error please report the bug
> update-initramfs: failed for /boot/initrd.img-2.6.26-2-xen-amd64
> 
> This was caused by a sequence of bugs, of which this describes the
> first (and easiest to fix)
> 
> On line 259 of /usr/share/initramfs-tools/hook-functions is found:
> 
> block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
>                                 /proc/mdstat)
> 
> In this case, this command found not md1, as desired, but md11.
> 
> The full line found was:
> 
> md11 : active (auto-read-only) raid1 sdm1[0] sdn1[1]
> 
> This is easily fixed with the following patch:
> 
> --- /usr/share/initramfs-tools/hook-functions   2008-12-18 16:41:11.000000000 +0000
> +++ hook-functions      2010-09-23 17:31:56.000000000 +0100
> @@ -256,7 +256,7 @@
>                 fi
> # lvm on md or luks on md
>                 if [ "${block#md}" != "${block}" ]; then
> -                       block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
> +                       block=$(awk "/^${block} /{print substr(\$5, 1, 4); exit}" \
>                                 /proc/mdstat)
>                 fi
>                 block=${block%[0-9]*}
> 
> 
> Subsequent bugs which were exposed by this one:
> 
> 2) In this case md11 is marked auto-read-only (because it has not been
> written to) which means that the fifth column is not a component device
> name, but the raid level
> 3) the substr use here would presumably break discovery of component
> devices with something other than exactly four characters.

it was quick adhoc code, anyway MODULES=dep is not default.
 
> but I'm not sure it's worth filing separate bugs for them, especially
> since it looks like it's all changed in sid/sqeeze.

indeed it is fixed in newer initramfs-tools, which should just install
fine in lenny. Closing as aboves should be fixed since,
if you can reproduce with newer shout and will be reopened.

thanks for your report.


--- End Message ---

Reply to: