-while [ "$1" ]; do
- case $1 in
- *.xml) export NAME=`echo $1 | sed "s/.xml//"` ;;
- *) OPTS="$OPTS $1" ;;
- esac
- shift
-done
-
-mounted_lustre_filesystems() {
- awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
-}
-
-MOUNTED="`mounted_lustre_filesystems`"
-if [ -z "$MOUNTED" ]; then
- formatall
- setupall
- MOUNTED="`mounted_lustre_filesystems`"
- [ -z "$MOUNTED" ] && error "NAME=$NAME not mounted"
- I_MOUNTED=yes
-fi
-
-MOUNT=$MOUNTED
-
-OSCTMP=`echo $MOUNT | tr "/" "."`
-USED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
-USED=`expr $USED + 16` # Some space for the status file
+check_and_setup_lustre
+test_1() {
+sleep 5 # let MDS refresh aggregated statfs
+# Include some extra space for the status file
+USED=$(df -P $DIR | awk '{ print $3 }' | tail -n 1)