5 export MOUNTPT=${MOUNTPT:-"/mnt/lustre"}
6 export LCONF=${LCONF:-"../utils/lconf"}
7 export CONFIG=${CONFIG:-"$NAME.xml"}
8 export MCREATE=${MCREATE:-"mcreate"}
9 export LFS=${LFS:-"/usr/sbin/lfs"}
10 export SETSTRIPE_SIZE=${SETSTRIPE_SIZE:-"131072"}
11 export OPENFILE=${OPENFILE:-"./openfile"}
19 . ./llmount.sh || fail "Mount lustre failed"
23 echo "test 0 IO after open file"
25 $OPENFILE -f O_RDWR:O_CREAT -m 0755 $MOUNTPT/d0/f || fail "open file failed."
26 ls -lR >> $MOUNTPT/d0/f || fail "IO after open failed."
27 rm -fr $MOUNTPT/d0 || fail "Unable to ereas dir."
28 echo "test 0 success."
32 echo "test 1 IO after mcreate "
34 $MCREATE $MOUNTPT/d1/f || fail "mcreate file failed."
35 ls -lR >> $MOUNTPT/d1/f || fail "IO after mcreate failed."
36 rm -fr $MOUNTPT/d1 || fail "Unable to ereas the file."
37 echo "test 1 success."
41 echo "test 2 IO after mcreate with strip 1 "
43 $MCREATE $MOUNTPT/d2/f || fail "mcreate file failed."
44 $LFS setstripe $MOUNTPT/d2/f $SETSTRIPE_SIZE 0 1 || fail "setstipe to stripe 1 failed"
45 ls -lR >> $MOUNTPT/d2/f || fail "IO after mcreate failed."
46 rm -fr $MOUNTPT/d2 || fail "Unable to ereas the file."
47 echo "test 2 success."
52 echo "test 2 IO after mcreate with strip 4 "
54 $MCREATE $MOUNTPT/d3/f || fail "mcreate file failed."
55 $LFS setstripe $MOUNTPT/d3/f $SETSTRIPE_SIZE 0 4 || fail "setstipe to stripe 4 failed"
56 ls -lR >> $MOUNTPT/d3/f || fail "IO after mcreate failed."
57 rm -fr $MOUNTPT/d3 || fail "Unable to ereas the file."
58 echo "test 3 success."
62 echo "test 4 IO after mcreate with strip 6 "
64 $MCREATE $MOUNTPT/d3/f || fail "mcreate file failed."
65 $LFS setstripe $MOUNTPT/d3/f $SETSTRIPE_SIZE 0 6 || fail "setstipe to stripe 6 failed"
66 ls -lR >> $MOUNTPT/d3/f || fail "IO after mcreate failed."
67 rm -fr $MOUNTPT/d3 || fail "Unable to ereas the file."
68 echo "test 4 success."
73 echo "clean up lustre"
75 $LCONF --cleanup $CONFIG || fail "Unable to clean up lustre."
76 echo "clean up lustre success"