Changeset 2567 in MondoRescue


Ignore:
Timestamp:
Feb 1, 2010, 6:10:24 PM (14 years ago)
Author:
Bruno Cornec
Message:
  • Improve device exclusion for LVM by adding support for symlinks and mapper systematically at all levels (PV, VG, LV). Should really provvide the best support possible for LVM exclusion.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/analyze-my-lvm

    r2566 r2567  
    5454    # Exclude LVs member of that env var
    5555    if [ "$MINDI_EXCLUDE_DEVS" ] ; then
     56        list_of_devices="`mindi --readalllink $LV_full_string`"
     57        l=""
     58        for d in $list_of_devices; do
     59            l="$l `GiveMapperOfdm $d`"
     60        done
     61        list_of_devices="`echo $l | sort -u`"
    5662        for ed in $MINDI_EXCLUDE_DEVS ; do
    57             list_of_devices="`GiveMapperOfdm $LV_full_string`"
    5863            if  [ "`echo " $list_of_devices" | grep " $ed"`" != "" ]; then
    5964                echo "Not including device $LV_full_string as it was excluded"
     
    143148    l=""
    144149    if [ -f /etc/multipath.conf ]; then
    145         # If multipath check which type of devidec are given, mpath prefered
     150        # If multipath check which type of devide are given, mpath prefered
    146151        for d in $list_of_devices; do
     152            l="$l `mindi --readalllink $d`"
    147153            l="$l `GiveMapperOfdm $d`"
    148154        done
    149         list_of_devices=$l
     155        list_of_devices="`echo $l | sort -u`"
    150156    fi
    151157
     
    172178
    173179    rm -f $MINDI_TMP/pv.tmp2
     180    l=""
    174181    for d in `cat $MINDI_TMP/pv.tmp`; do
    175182        # Skip devices excluded, coming from mondoarchive
    176183        skip=0
     184        l="$l `mindi --readalllink $d`"
     185        l="$l `GiveMapperOfdm $d`"
     186        list_of_devices="`echo $l | sort -u`"
    177187        if [ "$MINDI_EXCLUDE_DEVS" ] ; then
    178188            for ed in $MINDI_EXCLUDE_DEVS ; do
    179                 if  [ "`echo " $d " | grep " $ed"`" != "" ]; then
     189                if  [ "`echo " $list_of_devices " | grep " $ed"`" != "" ]; then
    180190                    skip=1
    181191                    continue
     
    190200
    191201    if [ -f /etc/multipath.conf ]; then
    192         # If multipath check which type of devidec are given, mpath prefered
     202        # If multipath check which type of devide are given, mpath prefered
    193203        if [ -f  $MINDI_TMP/pv.tmp2 ]; then
     204            l=""
    194205            for d in `cat $MINDI_TMP/pv.tmp2`; do
    195206                skip=0
     207                l="$l `mindi --readalllink $d`"
     208                l="$l `GiveMapperOfdm $d`"
     209                list_of_devices="`echo $l | sort -u`"
    196210                if [ "$MINDI_EXCLUDE_DEVS" ] ; then
    197211                    for ed in $MINDI_EXCLUDE_DEVS ; do
    198                         if  [ "`echo " $d " | grep " $ed"`" != "" ]; then
     212                        if  [ "`echo " $list_of_devices " | grep " $ed"`" != "" ]; then
    199213                            skip=1
    200214                            continue
Note: See TracChangeset for help on using the changeset viewer.