6 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
7 . $LUSTRE/tests/test-framework.sh
9 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
12 racer=$LUSTRE/tests/racer/racer.sh
13 echo racer: $racer with $MDSCOUNT MDTs
15 if [ "$SLOW" = "no" ]; then
16 DURATION=${DURATION:-300}
18 DURATION=${DURATION:-900}
20 MOUNT_2=${MOUNT_2:-"yes"}
23 check_and_setup_lustre
25 CLIENTS=${CLIENTS:-$HOSTNAME}
26 RACERDIRS=${RACERDIRS:-"$DIR $DIR2"}
27 echo RACERDIRS=$RACERDIRS
30 RACER_ENABLE_MIGRATION=false
33 $(lustre_version_code $SINGLEMDS) >= $(version_code 2.8.0))); then
34 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-true}
35 RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-true}
36 RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-true}
37 elif ((MDSCOUNT > 1 &&
38 $(lustre_version_code $SINGLEMDS) >= $(version_code 2.5.0))); then
39 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-true}
42 [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.54) ||
43 $(facet_fstype mgs) != zfs ]] && RACER_ENABLE_SNAPSHOT=false
45 [[ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.9.55) ]] &&
46 RACER_ENABLE_PFL=false
48 [[ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.10.53) ]] &&
49 RACER_ENABLE_DOM=false
51 [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ]] &&
52 RACER_ENABLE_FLR=false
54 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-false}
55 RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-false}
56 RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-false}
57 RACER_ENABLE_SNAPSHOT=${RACER_ENABLE_SNAPSHOT:-true}
58 RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
59 RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
60 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
66 local clients=$CLIENTS
70 for d in ${RACERDIRS}; do
71 is_mounted $d || continue
73 RDIRS="$RDIRS $d/racer"
75 # lfs setstripe $d/racer -c -1
76 if [ $MDSCOUNT -ge 2 ]; then
77 for i in $(seq $((MDSCOUNT - 1))); do
78 RDIRS="$RDIRS $d/racer$i"
79 if [ ! -e $d/racer$i ]; then
80 $LFS mkdir -i $i $d/racer$i ||
81 error "lfs mkdir $i failed"
88 for rdir in $RDIRS; do
89 do_nodes $clients "DURATION=$DURATION \
90 MDSCOUNT=$MDSCOUNT OSTCOUNT=$OSTCOUNT\
91 RACER_ENABLE_REMOTE_DIRS=$RACER_ENABLE_REMOTE_DIRS \
92 RACER_ENABLE_STRIPED_DIRS=$RACER_ENABLE_STRIPED_DIRS \
93 RACER_ENABLE_MIGRATION=$RACER_ENABLE_MIGRATION \
94 RACER_ENABLE_PFL=$RACER_ENABLE_PFL \
95 RACER_ENABLE_DOM=$RACER_ENABLE_DOM \
96 RACER_ENABLE_FLR=$RACER_ENABLE_FLR \
99 $racer $rdir $NUM_RACER_THREADS" &
105 if $RACER_ENABLE_SNAPSHOT; then
108 $LUSTRE/tests/racer/lss_create.sh &
110 lss_pids="$lss_pids $pid"
112 $LUSTRE/tests/racer/lss_destroy.sh &
114 lss_pids="$lss_pids $pid"
117 echo racers pids: $rpids
118 for pid in $rpids; do
121 echo "pid=$pid rc=$rc"
122 if [ $rc != 0 ]; then
127 if $RACER_ENABLE_SNAPSHOT; then
128 killall -q lss_create.sh
129 killall -q lss_destroy.sh
131 for pid in $lss_pids; do
140 run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
143 check_and_cleanup_lustre