checkfs fails when trying to start software raid since if there were more than one device the if [ -n ${ACTIVE_RAID} ] would be invalid and so would the grep -v. A quick patch to this problem is as follows (I don't think it's the best solution though but that's what I was able to think of for now): --- checkfs.old Wed Dec 11 18:12:39 2002 +++ checkfs.new Wed Dec 11 19:23:21 2002 @@ -33,12 +33,22 @@ then ebegin "Starting software RAID" ACTIVE_RAID="`grep -E "md[0-9]+[[:space:]]?: active raid" /proc/mdstat | awk -F ':' '{print "/dev/"$1}'`" - if [ -n ${ACTIVE_RAID} ] + if [ `echo ${ACTIVE_RAID} | awk 'BEGIN { ORS=""}{ for (i = 1; i <= NF; i++) if (i<2) print "-n "$i; else print " -a -n "$i; }'` ] then - for x in $(grep -E "raiddev /dev/md[0-9]+" /etc/raidtab | \ - awk '{print $2}' | grep -v "`echo ${ACTIVE_RAID} | sed s'/[[:space:]]//g'`") + for x in $(grep -E "raiddev /dev/md[0-9]+" /etc/raidtab | awk '{print $2}') do - /sbin/raidstart ${x} + RAIDSTART=0 + for z in ${ACTIVE_RAID} + do + if [ ${z} == ${x} ] + then + RAIDSTART=1 + fi + done + if [ ${RAIDSTART} -eq 0 ] + then + /sbin/raidstart ${x} + fi done else /sbin/raidstart --all
Aliz, can you or Spanky have a look here ?
This bug is about to die of old age. /etc/init.d/checkfs has changed since the bug was filed. Can someone verify whether the problem persists and reopen if it does?