Changeset 2565


Ignore:
Timestamp:
Feb 1, 2010, 2:37:55 PM (10 years ago)
Author:
bruno
Message:
  • Fix LV exclusion when VGs are excluded (the excludedvgs file has to be removed at start and end of analyze-my-lvm not in functions, as they are called multiple times)
File:
1 edited

Legend:

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

    r2564 r2565  
    5555        if [ "`grep $volume_group $MINDI_TMP/excludedvgs`" = "" ]; then
    5656            echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
     57        else
     58            echo "Not including LV $logical_volume as VG $volume_group was excluded"
    5759        fi
    5860    else
    5961        echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
    6062    fi
    61     rm -f $MINDI_TMP/excludedvgs
    6263}
    6364
     
    139140    fi
    140141
    141     rm -f $MINDI_TMP/excludedvgs
    142142    if [ "$MINDI_EXCLUDE_DEVS" ] ; then
    143143        for ed in $MINDI_EXCLUDE_DEVS ; do
     
    304304fi
    305305
     306if [ _"$MINDI_TMP" = _"" ]; then
     307    # Launched stdalone, so create a temp dir
     308    MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
     309    if [ $? -ne 0 ]; then
     310        df $TMPDIR
     311        Die "Unable to create a temporary directory ! Check space on $TMPDIR"
     312    fi
     313    if [ _"$MINDI_TMP" = _"" ]; then
     314        Die "MINDI_TMP is empty, aborting"
     315    fi
     316    if [ _"$MINDI_TMP" = _"/" ]; then
     317        Die "MINDI_TMP is /, aborting"
     318    fi
     319fi
     320
    306321# Older lvmdiskscan use --help, newer --version
    307322lvmopt="--help"
     
    334349fi
    335350
     351rm -f $MINDI_TMP/excludedvgs
    336352all_lvm_drives_and_partitions=`ListLvmDrivesAndPartitions`
    337353echo "Just before you extrapolate mountlist to include RAID partitions,"
     
    371387    echo "(mkfs -t foo $i or something like that)"
    372388done
     389rm -f $MINDI_TMP/excludedvgs
    373390WriteShutdownScript
    374391exit 0
Note: See TracChangeset for help on using the changeset viewer.