5 LUSTRE=${LUSTRE:-`dirname $0`/..}
6 . $LUSTRE/tests/test-framework.sh
10 . ${CONFIG:=$LUSTRE/tests/cfg/local.sh}
12 ostfailover_HOST=${ostfailover_HOST:-$ost_HOST}
16 add_mds mds --dev "$MDSDEV" --size "$MDSSIZE"
17 add_lov lov1 mds --stripe_sz $STRIPE_BYTES \
18 --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
19 add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE --failover
20 if [ ! -z "$ostfailover_HOST" ]; then
21 add_ostfailover ost --dev $OSTDEV --size $OSTSIZE
23 add_client client mds --lov lov1 --path $MOUNT
27 # make sure we are using the primary MDS, so the config log will
28 # be able to clean up properly.
29 activeost=`facet_active ost`
30 if [ $activeost != "ost" ]; then
33 zconf_umount `hostname` $MOUNT
34 stop mds ${FORCE} $MDSLCONFARGS
35 stop ost ${FORCE} --dump $TMP/replay-ost-single-`hostname`.log
38 if [ "$ONLY" == "cleanup" ]; then
39 sysctl -w portals.debug=0
46 SETUP=${SETUP:-"setup"}
47 CLEANUP=${CLEANUP:-"cleanup"}
52 start ost --reformat $OSTLCONFARGS
53 [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
54 start mds --reformat $MDSLCONFARGS
56 if [ -z "`grep " $MOUNT " /proc/mounts`" ]; then
57 # test "-1" needed during initial client->OST connection
58 log "== test 00: target handle mismatch (bug 5317) === `date +%H:%M:%S`"
60 #define OBD_FAIL_OST_ALL_REPLY_NET 0x211
61 do_facet ost "sysctl -w lustre.fail_loc=0x80000211"
63 zconf_mount `hostname` $MOUNT && df $MOUNT && pass || error "mount fail"
71 LCOUNT=${LCOUNT:-10000}
74 ./createmany -o $DIR/llog-%d $LCOUNT
77 run_test 0 "Prepare fileset"
80 ./chownmany 1000 $DIR/llog-%d $LCOUNT
83 run_test 1 "Do chowns"
86 HALFCOUNT=${HALFCOUNT:-17}
87 ./chownmany 500 $DIR/llog-%d 0 $HALFCOUNT
89 ./chownmany 500 $DIR/llog-%d $HALFCOUNT $LCOUNT
92 #run_test 2 "Fail OST during chown"
95 ./unlinkmany $DIR/llog-%d $LCOUNT
97 $CHECKSTAT -t file $DIR/llog-* && return 1 || true
99 run_test 3 "Remove testset"
101 equals_msg test complete, cleaning up
102 FORCE=--force $CLEANUP