Whamcloud - gitweb
b=15612
[fs/lustre-release.git] / lustre / tests / oos2.sh
index 1eb5dbd..d3a4050 100644 (file)
@@ -33,8 +33,8 @@ fi
 export LANG=C LC_LANG=C # for "No space left on device" message
 
 # make sure we stripe over all OSTs to avoid OOS on only a subset of OSTs
-$LFS setstripe $OOS 65536 -1 $STRIPECOUNT
-$LFS setstripe $OOS2 65536 -1 $STRIPECOUNT
+$LFS setstripe $OOS -c $STRIPECOUNT
+$LFS setstripe $OOS2 -c $STRIPECOUNT
 dd if=/dev/zero of=$OOS count=$((3 * $ORIGFREE / 4 + 100)) bs=1k 2>> $LOG &
 DDPID=$!
 if dd if=/dev/zero of=$OOS2 count=$((3*$ORIGFREE/4 + 100)) bs=1k 2>> $LOG2; then
@@ -59,6 +59,14 @@ for OSC in /proc/fs/lustre/osc/*-osc-*; do
        GRANT=`cat $OSC/cur_grant_bytes`
        [ $(($AVAIL - $GRANT / 1024)) -lt 400 ] && OSCFULL=full
 done
+
+# FIXME - This test reports false failures
+# The grants from multiple clients need to be added together and compared 
+# against the kbytesavail.
+#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04200/kbytesavail:16248
+#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04200/cur_grant_bytes:4313088
+#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04e00/cur_grant_bytes:12660736
+
 if [ -z "$OSCFULL" ]; then
        echo "no OSTs are close to full"
        grep "[0-9]" /proc/fs/lustre/osc/*-osc-*/{kbytesavail,cur*}|tee -a $LOG
@@ -75,6 +83,7 @@ if [ "$RECORDSOUT" -ne $(($FILESIZE / 1024)) ]; then
 fi
 
 rm -f $OOS $OOS2
+sync; sleep 1; sync
 
 if [ $SUCCESS -eq 1 ]; then
        echo "Success!"