Changeset 3066


Ignore:
Timestamp:
Nov 12, 2012, 6:15:00 PM (7 years ago)
Author:
bruno
Message:

Add function GiveVGLVOfdm to analyze-my-lvm to solve SLES11SP2 issue with /dev/dm-

Location:
branches/3.0/mindi
Files:
2 edited

Legend:

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

    r3063 r3066  
    251251}
    252252
     253GiveVGLVOfdm () {
     254
     255major=`stat -L -c "%t" $1 2> /dev/null`
     256minor=`stat -L -c "%T" $1 2> /dev/null`
     257
     258for v in `vgs --noheadings | awk '{print $1}'`; do
     259    for i in `ls /dev/$v/*`; do
     260        mj=`stat -L -c "%t" $i`
     261        mn=`stat -L -c "%T" $i`
     262        if [ "$mj" = "$major" ] && [ "$mn" = "$minor" ]; then
     263            echo "$i"
     264            return
     265        fi
     266    done
     267done
     268echo $1
     269}
     270
    253271
    254272ListLvmDrivesAndPartitions() {
     
    343361    if [ _"$1" != _"" ] ; then
    344362        GiveMapperOfdm $1
     363    fi
     364    exit 0
     365fi
     366
     367if [ "$1" = "--givevglvofdm" ] ; then
     368    shift
     369    if [ _"$1" != _"" ] ; then
     370        GiveVGLVOfdm $1
    345371    fi
    346372    exit 0
  • branches/3.0/mindi/mindi

    r3065 r3066  
    10851085            elif [ "`echo $current_partition | grep -E '^/dev/dm-'`" ]; then
    10861086                # For SLES 11 type of distro, do not use dm devices as they are unable to be handled by lvm commands
    1087                 current_partition=`$MINDI_LIB/analyze-my-lvm --givemapperofdm $current_partition`
     1087                current_partition=`$MINDI_LIB/analyze-my-lvm --givevglvofdm $current_partition`
    10881088            fi
    10891089            [ "`echo "$useless_dev" | grep -F "$current_partition"`" ] && continue
Note: See TracChangeset for help on using the changeset viewer.