Bug 8412 - CONFIG_MOUSE_PS2 makes RAID detection fail
Summary: CONFIG_MOUSE_PS2 makes RAID detection fail
Status: REJECTED WILL_NOT_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: MD (show other bugs)
Hardware: i386 Linux
: P2 low
Assignee: io_md
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-01 02:18 UTC by Peter Ganzhorn
Modified: 2008-09-23 11:12 UTC (History)
0 users

See Also:
Kernel Version: 2.6.21
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
.config of the kernel without CONFIG_MOUSE_PS2 that won't detect my RAID1 (42.10 KB, text/plain)
2007-05-01 02:19 UTC, Peter Ganzhorn
Details
dmesg of working 2.6.21 with MOUSE_PS2 enabled (14.17 KB, text/plain)
2007-05-01 02:20 UTC, Peter Ganzhorn
Details
dmesg of malfunctioning 2.6.21 without MOUSE_PS2 enabled (14.18 KB, text/plain)
2007-05-01 02:25 UTC, Peter Ganzhorn
Details

Description Peter Ganzhorn 2007-05-01 02:18:11 UTC
Most recent kernel where this bug did *NOT* occur: None
Distribution: Debian 4.0 - Etch (final)
Hardware Environment: HP/Compaq nc6000 laptop, Pentium M 1.6 GHz, Intel ICH4,
ATI Radeon Mobility 9600, 512 MB RAM
Software Environment: Debian-provided packages, self-compiled kernel
Problem Description: If a kernel without CONFIG_MOUSE_PS2 enabled is used, the
kernel won't detect my RAID1 array, but the hard drives it consits of are
properly detected and the partition type reads "FD - Linux Raid Autodetect" as well.
No /dev/md0 is created while booting the kernel.
I built 2.6.21 with the same .config except for CONFIG_MOUSE_PS2 twice for
testing purposes and discovered this weird thing.
I'm going to attach the .config (without CONFIG_MOUSE_PS2), the dmesg of this
kernel as well as the CONFIG_MOUSE_PS2-enabled kernels dmesg.

Steps to reproduce: Compile kernel without CONFIG_MOUSE_PS2 and attach some hard
drives that are part of a RAID array and see what happens...
Comment 1 Peter Ganzhorn 2007-05-01 02:19:30 UTC
Created attachment 11358 [details]
.config of the kernel without CONFIG_MOUSE_PS2 that won't detect my RAID1
Comment 2 Peter Ganzhorn 2007-05-01 02:20:59 UTC
Created attachment 11359 [details]
dmesg of working 2.6.21 with MOUSE_PS2 enabled
Comment 3 Peter Ganzhorn 2007-05-01 02:25:37 UTC
Created attachment 11360 [details]
dmesg of malfunctioning 2.6.21 without MOUSE_PS2 enabled
Comment 4 Peter Ganzhorn 2007-05-04 11:23:06 UTC
Seems with a friend of mine I was able to figure out the reason for the problem:
Without CONFIG_MOUSE_PS2 USB devices will be scanned after probing for MD
devices, but with CONFIG_MOUSE_PS2 the kernel will scan for USB devices and then
check for the MD devices.
Because my RAID1 consists of two USB hard disks the RAID cannot be detected if
the USB disks were not detected before ;)
See the dmesgs, they prove it - sdb and sdc are my USB disks.
Comment 5 Neil Brown 2007-05-06 18:40:12 UTC
I replied to this by mail, but the mail->bugzilla gateway seems to be broken.

I recommend the best approach is to not depend on in-kernel autodetect.
Simply get an init script to run "mdadm" with a suitable config file.

For completely proper handling of usb devices, you really want udev
to be running "mdadm --assemble --incremental" on every hot-plug event,
but you may not need that to get your system working.

If you really want to see if this ordering can be fixed in the kernel you
would need to change the "category" to point to usb / mass-storage.
The problem isn't that md is auto-detecting any earlier.  The problem is
that USB is discovering the devices later.  I would not be surprised if that
will not be "Fixed".
Comment 6 Peter Ganzhorn 2007-05-07 03:47:18 UTC
I understand that this is not a serious bug, it's just a bit annoying if one is
used to the in-kernel autodetection of RAID arrays.

>If you really want to see if this ordering can be fixed in the kernel you
>would need to change the "category" to point to usb / mass-storage.
Where exactly would I try to change this category you're talking about?

Thanks for the response anyway!
Comment 7 Alan 2008-09-23 11:12:14 UTC
Modern raid setups use UUID for a reason

Note You need to log in before you can comment on or make changes to this bug.