X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fscripts%2Flustre;h=0f8f0825fe4be6e5c96de4597f1ca4a75d27f897;hb=9c4156e6fc146a198bb342e28eb246f1076889bd;hp=1c27a0a5ce8f6b2d3b65ef3a880384966bd5e5db;hpb=f625f670afbe954030ff81f0f8522137d6cdd335;p=fs%2Flustre-release.git diff --git a/lustre/scripts/lustre b/lustre/scripts/lustre index 1c27a0a..0f8f082 100644 --- a/lustre/scripts/lustre +++ b/lustre/scripts/lustre @@ -595,6 +595,7 @@ stop_lustre_services () # General lustre health check - not device specific. health_check () { + old_nullglob="`shopt -p nullglob`" shopt -u nullglob @@ -621,14 +622,14 @@ health_check () OST="" LLITE="" - VAR=$(lctl get_param -n mdt.*.recovery_status 2>&1) + VAR=$(lctl get_param -n mdt.*.recovery_status 2>&1 | grep '^status:' ) if [ $? = 0 ] ; then - MDT="YES" + MDT=$VAR fi - VAR=$(lctl get_param -n obdfilter.*.recovery_status 2>&1) + VAR=$(lctl get_param -n obdfilter.*.recovery_status 2>&1 | grep '^status:') if [ $? = 0 ] ; then - OST="YES" + OST=$VAR fi VAR=$(lctl get_param -n llite.fs* 2>&1) @@ -659,7 +660,7 @@ health_check () fi # check for servers in recovery - if [ -n "$MDT$OST" ] && grep -q RECOV $MDT $OST ; then + if [ -n "$MDT$OST" ] && echo $MDT $OST | grep -q RECOV ; then STATE="recovery" RETVAL=0 fi