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"
}
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
SUCCESS=0
fi
-rm -f $OOS $LOG
+rm -f $OOS $OOS2 $LOG
if [ $SUCCESS -eq 1 ]; then
echo "Success!"