On Monday July 3, bluca@xxxxxxxxxx wrote: > Hello, > the following patch aims at solving an issue that is confusing a lot of > users. > when using udev, device files are created only when devices are > registered with the kernel, and md devices are registered only when > started. > mdadm needs the device file _before_ starting the array. > so when using udev you must add --auto=yes to the mdadm commandline or > to the ARRAY line in mdadm.conf > > following patch makes auto=yes the default when using udev > The principle I'm reasonably happy with, though you can now make this the default with a line like CREATE auto=yes in mdadm.conf. However.... > + > + /* if we are using udev and auto is not set, mdadm will almost > + * certainly fail, so we force it here. > + */ > + if (autof == 0 && access("/dev/.udevdb",F_OK) == 0) > + autof=2; > + I'm worried that this test is not very robust. On my Debian/unstable system running used, there is no /dev/.udevdb though there is a /dev/.udev/db I guess I could test for both, but then udev might change again.... I'd really like a more robust check. Maybe I could test if /dev was a mount point? Any other ideas? NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html