Changeset 2566


Ignore:
Timestamp:
Feb 1, 2010, 5:07:15 PM (10 years ago)
Author:
bruno
Message:
  • Now supports also excludion of LVs directly
  • Improve mindi by handling excluded devices earlier in the loop.
Location:
branches/2.2.9/mindi
Files:
2 edited

Legend:

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

    r2565 r2566  
    5151        fi
    5252    fi
     53
     54    # Exclude LVs member of that env var
     55    if [ "$MINDI_EXCLUDE_DEVS" ] ; then
     56        for ed in $MINDI_EXCLUDE_DEVS ; do
     57            list_of_devices="`GiveMapperOfdm $LV_full_string`"
     58            if  [ "`echo " $list_of_devices" | grep " $ed"`" != "" ]; then
     59                echo "Not including device $LV_full_string as it was excluded"
     60                return
     61            fi
     62        done
     63    fi
    5364    # Do not process LV whose VG are excluded
    5465    if [ -f $MINDI_TMP/excludedvgs ]; then
    55         if [ "`grep $volume_group $MINDI_TMP/excludedvgs`" = "" ]; then
    56             echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
    57         else
     66        if [ "`grep $volume_group $MINDI_TMP/excludedvgs`" != "" ]; then
    5867            echo "Not including LV $logical_volume as VG $volume_group was excluded"
    59         fi
    60     else
    61         echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
    62     fi
     68            return
     69        fi
     70    fi
     71
     72    echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
    6373}
    6474
  • branches/2.2.9/mindi/mindi

    r2564 r2566  
    11871187        fi
    11881188
     1189        # Look for devices which have to be excluded
     1190        skip=0
     1191        if [ "$MINDI_EXCLUDE_DEVS" ] ; then
     1192            for d in $MINDI_EXCLUDE_DEVS ; do
     1193                if  [ "`echo " $current_partition " | grep " $d"`" != "" ]; then
     1194                    echo "Excluding $current_partition from mountlist (due to excluded device $d)" >> $LOGFILE
     1195                    skip=1
     1196                    continue
     1197                fi
     1198            done
     1199        fi
     1200        if [ $skip -eq 1 ]; then
     1201            continue
     1202        fi
     1203
    11891204        partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB`
    11901205        # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab
     
    12681283            fi
    12691284        fi
    1270         skip=0
    1271         if [ "$MINDI_EXCLUDE_DEVS" ] ; then
    1272             for d in $MINDI_EXCLUDE_DEVS ; do
    1273                 if  [ "`echo " $current_partition " | grep " $d"`" != "" ]; then
    1274                     echo "Excluding $current_partition from mountlist (due to excluded device $d)" >> $LOGFILE
    1275                     skip=1
    1276                     continue
    1277                 fi
    1278             done
    1279         fi
    1280         if [ $skip -eq 1 ]; then
    1281             continue
    1282         fi
     1285
    12831286        if [ ! "$partition_mountpt" ] ; then
    12841287            echo "------- $FDISK -l $qq log ------------" >> $LOGFILE
Note: See TracChangeset for help on using the changeset viewer.