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"
55 obdflter_survey_targets () {
60 disk) targets=$(get_targets);;
61 netdisk) targets=$(get_targets);;
62 network) targets="$(osts_nodes)";;
63 *) error "unknown obdflter-survey case!" ;;
68 obdflter_survey_run () {
71 rm -f ${TMP}/obdfilter_survey*
73 local targets=$(obdflter_survey_targets $case)
74 local cmd="thrlo=$thrlo nobjhi=$nobjhi thrhi=$thrhi size=$size case=$case rslt_loc=${TMP} targets=\"$targets\" sh $OBDSURVEY"
78 cat ${TMP}/obdfilter_survey*
81 obdflter_survey_run disk
83 run_test 1a "Object Storage Targets survey"
86 obdflter_survey_run netdisk
88 run_test 2a "Stripe F/S over the Network"
90 # README.obdfilter-survey: In network test only automated run is supported.
92 remote_servers || { skip "Local servers" && return 0; }
94 # The Network survey test needs:
95 # Start lctl and check for the device list. The device list must be empty.
98 obdflter_survey_run network
102 run_test 3a "Network survey"
104 equals_msg `basename $0`: test complete, cleaning up
106 check_and_cleanup_lustre
107 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true