Bug 187690 - Fails to mount software RAID as rootfs
Fails to mount software RAID as rootfs
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-02 13:40 EDT by Enrico Scholz
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-16 17:33:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2006-04-02 13:40:46 EDT
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).
Comment 1 Enrico Scholz 2006-04-02 14:02:06 EDT
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@redhat.com
| 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@redhat.com
| 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).
Comment 2 Peter Jones 2006-08-16 17:33:40 EDT
We don't build that as a module, and likely won't start.  So this isn't really a
bug.

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