Changeset 2244


Ignore:
Timestamp:
Jul 1, 2009, 5:09:10 PM (10 years ago)
Author:
bruno
Message:
  • Remove inactive vg from lvmscan output really in analyze-my-lvm
  • Do not exit abruptly in any case in analyze-my-lvm when detecting an analysis issue, but return instead.
File:
1 edited

Legend:

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

    r2243 r2244  
    3232    local LV_full_string fname logical_volume volume_group device
    3333    LV_full_string=$1
    34     [ ! -e "$1" ] && Die "Cannot find LV file $1"
     34    if [ ! -e "$1" ]; then
     35        echo "WARNING - cannot find LV file $1" | tee -a /dev/stderr
     36        return
     37    fi
    3538    volume_group=`echo "$LV_full_string" | cut -d'/' -f3`
    3639    logical_volume=`echo "$LV_full_string" | cut -d'/' -f4`
     
    4144        fname=/proc/lvm/VGs/$volume_group/LVs/$logical_volume
    4245        if [ ! -e "$fname" ] ; then
    43             echo "Warning - cannot find $volume_group's $logical_volume LV file"
     46            echo "WARNING - cannot find $volume_group's $logical_volume LV file" | tee -a /dev/stderr
     47            return
    4448        else
    4549            device=`GetValueFromField $fname "name:"`
     
    198202ListAllLogicalVolumes() {
    199203    if [ $lvmversion = 2 ]; then
    200         $LVMCMD lvscan 2> /dev/null | grep "'" | grep -i "ACTIVE" | cut -d"'" -f2
    201     else
    202         lvscan 2> /dev/null | grep '"' | grep -i "ACTIVE" | cut -d'"' -f2
     204        $LVMCMD lvscan 2> /dev/null | grep "'" | grep -iw "ACTIVE" | cut -d"'" -f2
     205    else
     206        lvscan 2> /dev/null | grep '"' | grep -iw "ACTIVE" | cut -d'"' -f2
    203207    fi
    204208}
Note: See TracChangeset for help on using the changeset viewer.