Changeset 1272


Ignore:
Timestamp:
Mar 26, 2007, 7:35:06 PM (12 years ago)
Author:
bruno
Message:

On CentOS 4.4 mdrun isn't available anymore so init should use mdadm instead.
(based on a patch of Momtchil Momtchev <momtchil.momtchev_at_linagora.com>)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/rootfs/sbin/init

    r1193 r1272  
    309309StartRaids() {
    310310    local raid_devices i
     311
     312    raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    311313    if which raidstart > /dev/null 2> /dev/null ; then
    312         raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    313314        for i in $raid_devices ; do
    314315            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     
    322323        LogIt "Running 'mdrun'" 1
    323324        mdrun
     325    elif which mdadm > /dev/null 2> /dev/null ; then
     326        LogIt "Running 'mdadm'" 1
     327        for i in $raid_devices ; do
     328            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     329                LogIt "$i is started already; no need to run 'mdadm $i'" 1
     330            else
     331                LogIt "Running 'mdadm $i'" 1
     332                mdadm -Ac partitions -m dev $i
     333            fi
     334        done
    324335    else
    325336        LogIt "Warning: Neither 'raidstart' nor 'mdrun''found. RAID devices may not have started." 1
Note: See TracChangeset for help on using the changeset viewer.