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 $(lustre_version_code $SINGLEMDS) >= $(version_code 2.8.0))); then
31 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-true}
32 RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-true}
33 RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-true}
34 elif ((MDSCOUNT > 1 &&
35 $(lustre_version_code $SINGLEMDS) >= $(version_code 2.5.0))); then
36 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-true}
39 RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-false}
40 RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-false}
41 RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-false}
43 check_progs_installed $CLIENTS $racer ||
44 { skip_env "$racer not found" && exit 0; }
50 local clients=$CLIENTS
54 for d in ${RACERDIRS}; do
55 is_mounted $d || continue
57 RDIRS="$RDIRS $d/racer"
59 # lfs setstripe $d/racer -c -1
60 if [ $MDSCOUNT -ge 2 ]; then
61 for i in $(seq $((MDSCOUNT - 1))); do
62 RDIRS="$RDIRS $d/racer$i"
63 if [ ! -e $d/racer$i ]; then
64 $LFS mkdir -i $i $d/racer$i ||
65 error "lfs mkdir $i failed"
72 for rdir in $RDIRS; do
73 do_nodes $clients "DURATION=$DURATION \
75 RACER_ENABLE_REMOTE_DIRS=$RACER_ENABLE_REMOTE_DIRS \
76 RACER_ENABLE_STRIPED_DIRS=$RACER_ENABLE_STRIPED_DIRS \
77 RACER_ENABLE_MIGRATION=$RACER_ENABLE_MIGRATION \
79 $racer $rdir $NUM_RACER_THREADS" &
84 echo racers pids: $rpids
88 echo "pid=$pid rc=$rc"
96 run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
99 check_and_cleanup_lustre