lkml.org 
[lkml]   [2000]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: RAID modules and CONFIG_AUTODETECT_RAID
On Wednesday November 15, peter@cadcamlab.org wrote:
>
> [Ian Grant <Ian.Grant@cl.cam.ac.uk>]
> > Of course we need an initrd with the raid modules on it before we can
> > boot from a RAID root partition.
>
> raidtools can't run from an initrd?
>
> Peter

There is a realy issue here.
raidstart currently does not reliably start an array in the face of
drive failure or device renaming. So it could be used in an initrd
setup, but it might not be as reliable as autodetect.

2.4 has appropriate ioctls to allow for a more reliable raidstart, but
that raidstart hasn't been written yet. I have some patches for the
standard raidstart that improve the situation a bit, but I would
prefer a very different looking config file.

So while I would prefer that autodetection were done by user-space,
especially if initrd were being used, I can see that that isn't going
to happen just now, and that it shouldn't be too hard to do in the
kernel, and it is not really unreasonable to do it there.

Ian, could you please try the attached patch?
It looks ok to me, and compiles, but I am not in a good position to
test it at the moment.
Hopefully it will do an auto-detect when you load md.o, and will
automatically load raidX.o as required.

Let me know how it goes, and if there are no problems I will see what
Linus thinks of it.

NeilBrown



--- ./drivers/md/md.c 2000/11/14 21:36:22 1.2
+++ ./drivers/md/md.c 2000/11/15 21:46:28 1.3
@@ -3806,7 +3806,11 @@
#ifdef MODULE
int init_module (void)
{
- return md_init();
+ int rv = md_init();
+#ifdef CONFIG_AUTODETECT_RAID
+ if (rv==0) rv=md_run_setup();
+#endif
+ return rv;
}

static void free_device_names(void)
--- ./drivers/md/Config.in 2000/11/15 20:51:53 1.1
+++ ./drivers/md/Config.in 2000/11/15 21:46:29 1.2
@@ -13,6 +13,8 @@
dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_RAID0" = "y" -o "$CONFIG_MD_RAID1" = "y" -o "$CONFIG_MD_RAID5" = "y" ]; then
bool ' Boot support' CONFIG_MD_BOOT
+fi
+if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_RAID0" = "y" -o "$CONFIG_MD_RAID1" = "y" -o "$CONFIG_MD_RAID5" = "y" -o "$CONFIG_BLK_DEV_MD" = "m" ]; then
bool ' Auto Detect support' CONFIG_AUTODETECT_RAID
fi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.058 / U:2.180 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site