5 LUSTRE=${LUSTRE:-`dirname $0`/..}
6 . $LUSTRE/tests/test-framework.sh
13 # the summary file a bit smaller than OSTSIZE
14 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
16 [ "$SLOW" = no ] && { nobjhi=1; thrhi=4; }
19 ALWAYS_EXCEPT="$OBDFILTER_SURVEY_EXCEPT"
21 OBDSURVEY=${OBDSURVEY:-$(which obdfilter-survey)}
24 check_and_setup_lustre
27 $LCTL get_param -n osc.*.kbytesavail | sort -n | head -n1
30 # FIXME: the summary file a bit smaller than OSTSIZE, add estimation
31 minsize=$(min_ost_size)
32 if [ $(( size * 1024 )) -ge $minsize ]; then
33 size=$((minsize * 10 / 1024 / 12 ))
34 echo min kbytesavail: $minsize using size=${size} MBytes per obd instance
42 for oss in $(osts_nodes); do
43 devs=$(do_node $oss "lctl dl |grep obdfilter |sort" | awk '{print $4}')
45 # if oss is local -- obdfilter-survey needs dev wo/ host
47 [[ $oss = `hostname` ]] || target=$oss:$target
48 targets="$targets $target"
56 rm -f ${TMP}/obdfilter_survey*
58 local targets=$(get_targets)
59 local cmd="nobjhi=$nobjhi thrhi=$thrhi size=$size case=disk rslt_loc=${TMP} targets=\"$targets\" sh $OBDSURVEY"
63 cat ${TMP}/obdfilter_survey*
65 run_test 1 "Object Storage Targets survey"
68 rm -f ${TMP}/obdfilter_survey*
70 local targets=$(get_targets)
71 local cmd="nobjhi=$nobjhi thrhi=$thrhi size=$size rslt_loc=${TMP} case=netdisk targets=\"$targets\" sh $OBDSURVEY"
75 cat ${TMP}/obdfilter_survey*
77 run_test 2 "Stripe F/S over the Network"
79 # README.obdfilter-survey: In network test only automated run is supported.
81 remote_servers || { skip "Local servers" && return 0; }
84 rm -f ${TMP}/obdfilter_survey*
85 # The Network survey test needs:
86 # Start lctl and check for the device list. The device list must be empty.
89 local cmd="nobjhi=2 thrhi=4 size=$size targets="$(osts_nodes)" case=network sh $OBDSURVEY"
93 cat ${TMP}/obdfilter_survey*
96 run_test 3 "Network survey"
98 equals_msg `basename $0`: test complete, cleaning up
100 check_and_cleanup_lustre
101 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true