Changeset 2072 in MondoRescue for branches/2.2.8/mindi/rootfs/sbin/init


Ignore:
Timestamp:
Dec 5, 2008, 3:32:59 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • Adds multipath support (as exists on RHEL 5.2)
    • analyze-my-lvm/mindi uses the /dev/mapper/mpath... entry and not /dev/dm-... entry which is not automatically created at restore time
    • Lots of mapth dmsetup commands added to deplist
    • Adds required modules to mindi
    • Fix a bug for this in mindi around real devices with /dev/mapper/mpath... names
    • init has a new StartMpath function to start multipath correctly hopefully
    • mondorestore has a new clean_multiconf function which removes /var/lib/multipath/bindings and edits /etc/multipath.conf if needed
File:
1 edited

Legend:

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

    r2015 r2072  
    406406}
    407407
     408
     409StartMpath() {
     410    if [ "`grep -i nompath /proc/cmdline`" ]; then
     411        return;
     412    fi
     413    echo "Starting Mpath..."
     414    if [ -x /sbin/multipath ]; then
     415        mkdir -p /var/lib/multipath
     416        cat > /etc/multipath.conf << EOF
     417defaults {
     418        user_friendly_names yes
     419}
     420EOF
     421        /sbin/multipath -v 0
     422        if [ -x /sbin/kpartx ]; then
     423            /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p"
     424        fi
     425    fi
     426}
    408427
    409428StartRaids() {
     
    440459                fi
    441460            fi
     461        done
     462    elif
     463        if [ "`grep -i nodmraid /proc/cmdline`" ]; then
     464            return;
     465        fi
     466        for x in $(/sbin/dmraid -ay -i -p -t 2>/dev/null | grep -E  -iv "^no " |awk -F ':' '{ print $1 }') ; do
     467            echo "Please send the result of /sbin/dmraid -ay -i -p -t to the devteam !!!"
     468            return
     469            #dmname=$(resolve_dm_name $x)
     470            #[ -z "$dmname" ] && continue
     471            #/sbin/dmraid  -ay -i -p "$dmname" >/dev/null 2>&1
     472            #/sbin/kpartx -a -p p "/dev/mapper/$dmname"
    442473        done
    443474    else
     
    672703PauseForRaids
    673704StartRaids
     705StartMpath
    674706StartLvms
    675707CopyBootDevEntry
Note: See TracChangeset for help on using the changeset viewer.