On Sat, May 21, 2005 at 07:29:55PM +0200, martin f krafft wrote: > also sprach Erik van Konijnenburg <[EMAIL PROTECTED]> [2005.05.21.1917 +0200]: > > > - echo "Starting raid devices: " > > > + if [ -d /dev/.udevdb -a ! -e /dev/md0 -a ! -e /dev/md/0 ]; then > > > + echo -n "Creating raid device nodes: " > > > + cd /dev && WRITE_ON_UDEV=1 ./MAKEDEV md > > > + echo "done." > > > + fi > > > + echo -n "Starting raid devices: " > > > > I suspect this will not work if /dev/md0 is activated by the initrd, > > and the user wants to mount /dev/md7 which is not touched by initrd. > > At the moment, I can't test suspicion, so please feel free to ignore the > > following ramblings if testers are happy. > > What makes you suspicious? Whether the initrd has created device > nodes or not, the above should just create all the missing ones > for minors 0 through 15.
What happens is the following: * initrd creates devices needed for boot: root and swap, /boot is omitted. * these devices become visible in sysfs * after pivotroot, udevstart walks /sys at S04, and feeds /sys/block/md0 to udev; udev creates /dev/md0. * at S40 or so, you come along, see that /dev/md0 exists, and decide not to do MAKEDEV * now we don't have /dev/md7, and mdadm fails. * (unless you're an LVM user, but that's another story) > > The attached patch changes this, so that --auto works regardless of command > > line settings, like so: > > This is of course a much nicer solution. I am indifferent as to > which one is preferable, given the closeness to the release. Understood. I'm not a Debian maintainer, so none of the release pressure is on me; if you don't have room to work on this option, the alternative is fine with me. This patch is intended as a fallback in case your earlier upload does not make it through testing. As a worst case scenario, you can degrade the bug to wishlist and claim that users should do the auto thing in the config file. > I do want to note that your patch could be improved further, but we > need some discussion about how to do this: > > > - mdfd = open_mddev(devlist->devname, > > array_ident->autof); > > + mdfd = open_mddev(devlist->devname, (autof ? > > autof : array_ident->autof)); > > so if auto=mdp appears in the config, and --auto=md is passed, which > one should take priority? Right now, the command line option does > so. > > Isn't --auto=yes intended to enable this but read the actual setting > from the configuration file? I am not sure that your patch still > allows this. You're right that we should look at this, for now that's completely untested in this patch. I'll dive in and see if I can find out what's supposed to happen. Regards, Erik -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]