7 # This test needs to be run on the client
10 LUSTRE=${LUSTRE:-`dirname $0`/..}
11 . $LUSTRE/tests/test-framework.sh
13 . ${CONFIG:=$LUSTRE/tests/cfg/lmv.sh}
20 SETUP=${SETUP:-"setup"}
21 CLEANUP=${CLEANUP:-"stopall"}
23 if [ "$ONLY" == "cleanup" ]; then
24 lctl set_param debug=0 || true
36 if [ "$ONLY" == "setup" ]; then
42 # LU-482 Avert LVM and VM inability to flush caches in pre .33 kernels
43 if [ $LINUX_VERSION_CODE -lt $(version_code 2.6.33) ]; then
45 do_facet $SINGLEMDS sync
52 run_test 0 "empty replay"
55 # this test attempts to trigger a race in the precreation code,
56 # and must run before any other objects are created on the filesystem
58 createmany -o $DIR/$tfile 20 || return 1
59 unlinkmany $DIR/$tfile 20 || return 2
61 run_test 0b "ensure object created after recover exists. (3284)"
66 $CHECKSTAT -t dir $DIR/dir01 || return 1
71 run_test 1a "unlink cross-node dir (fail mds with inode)"
76 $CHECKSTAT -t dir $DIR/dir11 || return 1
81 run_test 1b "unlink cross-node dir (fail mds with name)"
85 createmany -o $DIR/dir21/f 3000
87 $CHECKSTAT -t dir $DIR/dir21 || return 1
88 $CHECKSTAT -t file $DIR/dir21/f1002 || return 1
94 run_test 2a "unlink cross-node file (fail mds with name)"
99 $LCTL mark "FAILOVER mds2"
102 $CHECKSTAT -t dir $DIR/dir3a1 || return 1
104 run_test 3a "mkdir cross-node dir (fail mds with inode)"
109 $LCTL mark "FAILOVER mds1"
112 $CHECKSTAT -t dir $DIR/dir3b1 || return 1
114 run_test 3b "mkdir cross-node dir (fail mds with inode)"