-[ -z "`grep "No space left on device" $TMP/oosfile`" ] && \
- echo "failed:dd not return ENOSPC" && SUCCESS=0
+export LANG=C LC_LANG=C # for "No space left on device" message
+
+[ -f $LOG ] && error "log file wasn't removed?"
+
+echo BEFORE dd started
+oos_full || true
+
+# make sure we stripe over all OSTs to avoid OOS on only a subset of OSTs
+$LFS setstripe $OOS -c $STRIPECOUNT
+# add 20% of margin since the metadata overhead estimated in bavail might be
+# too aggressive and we might be able to write more than reported initially
+# by statfs.
+echo dd size $((ORIGFREE * 120 / 100))kB
+if dd if=/dev/zero of=$OOS count=$((ORIGFREE * 120 / 100)) bs=1k 2> $LOG; then
+ echo "ERROR: dd did not fail"
+ SUCCESS=0
+fi