Whamcloud - gitweb
Merge HEAD->bug974 (20040126_1001).
authoradilger <adilger>
Mon, 26 Jan 2004 17:54:09 +0000 (17:54 +0000)
committeradilger <adilger>
Mon, 26 Jan 2004 17:54:09 +0000 (17:54 +0000)
b=974

lustre/tests/oos2.sh

index 9bfb134..892959f 100644 (file)
@@ -19,7 +19,7 @@ SUCCESS=1
 rm -f $OOS $OOS2 $LOG
 
 STRIPECOUNT=`cat /proc/fs/lustre/lov/*/activeobd | head -1`
-ORIGFREE=`df | grep " $MOUNT$" | awk '{ print $4 }'`
+ORIGFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -1`
 MAXFREE=${MAXFREE:-$((200000 * $STRIPECOUNT))}
 if [ $ORIGFREE -gt $MAXFREE ]; then
        echo "skipping out-of-space test on $OSC"
@@ -58,15 +58,16 @@ total_records() {
 }
 RECORDSOUT=`total_records $LOG`
 
-LEFTFREE=`df | grep " $MOUNT$" | awk '{ print $4 }'`
+LEFTFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -1`
 if [ $(($ORIGFREE - $LEFTFREE)) -lt $RECORDSOUT ]; then
         echo "ERROR: space used by dd not equal to available space"
         SUCCESS=0
        echo "$ORIGFREE - $LEFTFREE $RECORDSOUT"
 fi
 
-if [ $LEFTFREE -gt $((100 * $STRIPECOUNT)) ]; then
+if [ $LEFTFREE -gt $((400 * $STRIPECOUNT)) ]; then
        echo "ERROR: too much space left $LEFTFREE and -ENOSPC returned"
+       grep "[0-9]" /proc/fs/lustre/osc/OSC*MNT*/cur*
        SUCCESS=0
 fi
 
@@ -76,7 +77,7 @@ if [ $RECORDSOUT -ne $(($FILESIZE / 1024)) ]; then
         SUCCESS=0
 fi
 
-rm -f $OOS $LOG
+rm -f $OOS $OOS2 $LOG
 
 if [ $SUCCESS -eq 1 ]; then
        echo "Success!"