Opened 17 years ago

Closed 17 years ago

#189 closed defect (fixed)

mdadm fails on fedora core 4

Reported by: MarkNienberg Owned by: Bruno Cornec
Priority: normal Milestone: 2.2.5
Component: mondo Version: 2.2.4
Severity: normal Keywords:


When running mondorestore from a CD the command to assemble raid arrays fails on fedora core 4 with the error message "--super-minor=dev is incompatible with --auto". This is not logged, but I see it scroll by. Subsequently, it is impossible to do a Compare because the error "could not mount devices /dev/md2 /dev/md1 etc" occurs.

I think this does not occur on fedora core 6, possibly do to a more recent version of mdadm, which might have removed this limitation. One solution is to allow the user to supply a working mdadm.conf file by listing it in deplist.txt. A patch for mindi/rootfs/sbin/init is below. It uses mdadm.conf if it is supplied, otherwise it uses the current method.

--- init.original       2007-08-01 16:39:40.000000000 -0700
+++ init        2007-08-01 16:48:25.000000000 -0700
@@ -328,8 +328,13 @@ StartRaids() {
                if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
                LogIt "$i is started already; no need to run 'mdadm $i'" 1
-                       LogIt "Running 'mdadm $i'" 1
-                       mdadm -Ac partitions -m dev $i
+                       if [ -f /etc/mdadm.conf ] ; then
+                               LogIt "Running 'mdadm $i' with user supplied mdadm.conf" 1
+                               mdadm -A $i -c /etc/mdadm.conf
+                       else
+                               LogIt "Running 'mdadm $i'" 1
+                               mdadm -Ac partitions -m dev $i
+                       fi

I should caution that I'm not sure the default mdadm.conf that is created by anaconda during installation of fedora core 4 (and fedora core 5) will work. It creates an unusual looking file like this:

# mdadm.conf written out by anaconda
DEVICE partitions
ARRAY /dev/md2 super-minor=2
ARRAY /dev/md0 super-minor=0
ARRAY /dev/md1 super-minor=1

I made a new mdadm.conf as follows (fedora 6 default looks like this too) and it worked with the patched init:

DEVICE partitions
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=a32178cb:ea9368e5:96dd0cda:1c98d52a
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=6854701e:e39f476f:ed56b4b5:38cf2fd8
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=ff58df17:2bd2bfda:382d2e66:dae068cd
#this file created using "mdadm --detail --scan" to get the ARRAY lines

Change History (1)

comment:1 by Bruno Cornec, 17 years ago

Resolution: fixed
Status: newclosed

deplist.txt now contains mdadm.conf (rev [1587]). Your patch has been integrated in rev [1610] and will be in 2.2.5.

Note: See TracTickets for help on using tickets.