Changeset 3084


Ignore:
Timestamp:
Mar 2, 2013, 5:38:31 AM (5 years ago)
Author:
bruno
Message:
  • Should fix an issue with RHEL 6 where mindi was comparing an info obtained by readlink -f (/dev/dm-1) different from the one in fstab (/dev/mapper/systemvg-root_lv) and the one given by vgs in GiveMapperofDm? (/dev/systemvg/root_lv) leding to the FS being skpieed. Now we compare on both sides with readlink -f so we should find whatever is mentioned in fstab and use it. Accordingly the mountopt is now computed after this in order to still skip potential noaucto/bind FS now correctly detected instead of doing it too early.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/mindi

    r3081 r3084  
    11051105        partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$current_partition" | grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
    11061106
    1107         # Detects noauto partitions not mounted and exclude them
    1108         partition_option=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$current_partition" | grep -vx " *#.*" | $AWK '{print $4}' | head -n1`
    1109         if [ "`echo "$partition_option" | grep -i noauto`" != "" ] && [ "`mount | grep -w "$partition_mountpt"`" =  "" ] ; then
    1110                 LogFile "INFO: Excluding $current_partition from mountlist (due to noauto option in fstab)"
    1111             continue
    1112         fi
    1113         # Detects bind partitions and exclude them
    1114         if [ "`echo "$partition_option" | grep -iw bind`" != "" ]; then
    1115                 LogFile "INFO: Excluding $current_partition from mountlist (due to bind option in fstab)"
    1116             continue
    1117         fi
    1118 
    11191107        # set default in case we dont't find it
    11201108        str_to_find_fmt_with=$current_partition
     
    12661254                # set default in case we dont't find it
    12671255                for tmpp in `tr -s '\t' ' ' < $MY_FSTAB | grep -Ev "^#" | $AWK '{print $1}'`; do
    1268                         if [ _"`readlink -f $tmpp`" = _"$current_partition" ]; then
     1256                        if [ _"`readlink -f $tmpp`" = _"`readlink -f $current_partition`" ]; then
    12691257                            str_to_find_fmt_with=$tmpp
    12701258                            partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$tmpp" | grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
     
    12731261                done
    12741262            fi
     1263        fi
     1264
     1265        # Detects noauto partitions not mounted and exclude them
     1266        partition_option=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$str_to_find_fmt_with" | grep -vx " *#.*" | $AWK '{print $4}' | head -n1`
     1267        if [ "`echo "$partition_option" | grep -i noauto`" != "" ] && [ "`mount | grep -w "$partition_mountpt"`" =  "" ] ; then
     1268                LogFile "INFO: Excluding $current_partition from mountlist (due to noauto option in fstab)"
     1269            continue
     1270        fi
     1271        # Detects bind partitions and exclude them
     1272        if [ "`echo "$partition_option" | grep -iw bind`" != "" ]; then
     1273                LogFile "INFO: Excluding $current_partition from mountlist (due to bind option in fstab)"
     1274            continue
    12751275        fi
    12761276
Note: See TracChangeset for help on using the changeset viewer.