Changeset 2618 in MondoRescue


Ignore:
Timestamp:
Apr 8, 2010, 3:36:22 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Fix #414 by adding a function GetPVsForLV to remove PVs from excluded LVs (Mike Shapiro)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/mindi

    r2600 r2618  
    956956}
    957957
     958# Get PV's for an LV
     959GetPVsForLV() {
     960  if [ -n "$1" ]; then
     961    vg=`$LVMCMD lvdisplay $1 2>/dev/null |awk '/VG Name/{print $NF;exit}'`
     962    if [ -z "$vg" ]; then
     963      return
     964    fi
     965    $LVMCMD vgdisplay -v $vg 2>/dev/null | awk '/PV Name/{print $NF}'
     966  fi
     967}
     968
    958969
    959970MakeMountlist() {
     
    11891200                l="$l `$MINDI_LIB/analyze-my-lvm --givemapperofdm $d`"
    11901201            done
     1202
     1203            # Remove PVs from LVs excluded
     1204            l="$l `GetPVsForLV $current_partition`"
     1205
     1206            # We want a single unique list
    11911207            list_of_devices="`echo $l | sort -u`"
     1208
    11921209            for d in $MINDI_EXCLUDE_DEVS ; do
    11931210                if  [ "`echo " $list_of_devices " | grep " $d"`" != "" ]; then
Note: See TracChangeset for help on using the changeset viewer.