Description of problem: Current RAID_AUTORUN method of enabling RAID devices does not work with my software RAID1. When kernel is compiled with | CONFIG_MD=m the nash 'raidautorun' command is failing completely with ENODEV. Compiling it statically into the kernel makes 'raidautorun' succeed but without adding any devices to the raid-devices. Any access to /dev/md0 will result into an error and the kernel panics when trying to mount the root-device. RAID_AUTORUN seems to work for version 0.90 superblocks only; 1.x ones are not supported (see autostart_array() in drivers/md/md.c) When modifying /sbin/mkinitrd so that it makes ------- if [ -n "$raiddevices" ]; then + inst /sbin/mdadm.static "$MNTIMAGE/sbin/mdadm.static" + inst /etc/mdadm.conf "$MNTIMAGE/etc/mdadm.conf" + emit "/sbin/mdadm.static --assemble --scan" - for dev in $raiddevices; do - cp -a /dev/${dev} $MNTIMAGE/dev - emit "raidautorun /dev/${dev}" - done fi ------ the generated initrd image works. Version-Release number of selected component (if applicable): mkinitrd-5.0.32-1 How reproducible: 100% Additional info: The questionable /dev/md0 device was created "manually" with 'mdadm' and a version 0.90.03 superblock. This issue affects other /dev/md* devices too (both RAID0 and RAID1).
For completeness: The default | raidautorun md0 | raidautorun md1 | raidautorun md2 sequence generates kernel logmessages like | Apr 2 16:17:49 localhost@londo kernel: device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel | Apr 2 16:17:49 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 16:17:49 localhost@londo kernel: md: autorun ... | Apr 2 16:17:49 localhost@londo kernel: md: ... autorun DONE. | Apr 2 16:17:49 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 16:17:49 localhost@londo kernel: md: autorun ... | Apr 2 16:17:49 localhost@londo kernel: md: ... autorun DONE. | Apr 2 16:17:49 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 16:17:49 localhost@londo kernel: md: autorun ... | Apr 2 16:17:49 localhost@londo kernel: md: ... autorun DONE. | Apr 2 16:17:49 localhost@londo kernel: kjournald starting. Commit interval 5 seconds Looking at kernel sources says, that there should be listed some devices between 'autorun...' and '... autorun DONE'. Using 'mdadm' results into something like | Apr 2 18:33:07 localhost@londo kernel: device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel | Apr 2 18:33:07 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 18:33:07 localhost@londo kernel: md: autorun ... | Apr 2 18:33:07 localhost@londo kernel: md: ... autorun DONE. | Apr 2 18:33:07 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 18:33:07 localhost@londo kernel: md: autorun ... | Apr 2 18:33:07 localhost@londo kernel: md: ... autorun DONE. | Apr 2 18:33:07 localhost@londo kernel: md: Autodetecting RAID arrays. | Apr 2 18:33:07 localhost@londo kernel: md: autorun ... | Apr 2 18:33:07 localhost@londo kernel: md: ... autorun DONE. | Apr 2 18:33:07 localhost@londo kernel: md: md0 stopped. | Apr 2 18:33:07 localhost@londo kernel: md: bind<hdc1> | Apr 2 18:33:07 localhost@londo kernel: md: bind<hda1> | Apr 2 18:33:07 localhost@londo kernel: raid1: raid set md0 active with 2 out of 2 mirrors | Apr 2 18:33:07 localhost@londo kernel: md: md1 stopped. | Apr 2 18:33:07 localhost@londo kernel: md: bind<hdc6> | Apr 2 18:33:07 localhost@londo kernel: md: bind<hda6> | Apr 2 18:33:07 localhost@londo kernel: raid1: raid set md1 active with 2 out of 2 mirrors (this logging was created by executing 'mdadm' *after* 'raidautorun' instead of replacing it completely).
We don't build that as a module, and likely won't start. So this isn't really a bug.