6 ALWAYS_EXCEPT="12a $REPLAY_VBR_EXCEPT"
9 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
12 MOUNT_2=${MOUNT_2:-"yes"}
13 . $LUSTRE/tests/test-framework.sh
15 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
18 remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
20 [ "$SLOW" = "no" ] && EXCEPT_SLOW="7"
24 check_and_setup_lustre
27 rm -rf $DIR/[df][0-9]*
29 [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
31 # if there is no CLIENT1 defined, some tests can be ran on localhost
32 CLIENT1=${CLIENT1:-$HOSTNAME}
33 # if CLIENT2 doesn't exist then use CLIENT1 instead
34 # All tests should use CLIENT2 with MOUNT2 only therefore it will work if
36 # Exception is the test which need two separate nodes
37 CLIENT2=${CLIENT2:-$CLIENT1}
39 is_mounted $MOUNT2 || error "MOUNT2 is not mounted"
46 # We need to run do_node in bg, because pdsh does not exit
47 # if child process of run script exists.
48 # I.e. pdsh does not exit when runmultiop_bg_pause exited,
49 # because of multiop_bg_pause -> $MULTIOP_PROG &
50 # By the same reason we need sleep a bit after do_nodes starts
51 # to let runmultiop_bg_pause start muliop and
52 # update /tmp/multiop_bg.pid ;
53 # The rm /tmp/multiop_bg.pid guarantees here that
54 # we have the updated by runmultiop_bg_pause
55 # /tmp/multiop_bg.pid file
57 local pid_file=$TMP/multiop_bg.pid.$$
58 do_node $client "MULTIOP_PID_FILE=$pid_file LUSTRE= sh runmultiop_bg_pause $file $cmds" &
62 multiop_pid=$(do_node $client cat $pid_file)
63 [ -n "$multiop_pid" ] || error "$client : Can not get multiop_pid from $pid_file "
64 eval export $(client_var_name $client)_multiop_pid=$multiop_pid
65 eval export $(client_var_name $client)_do_node_pid=$pid
66 local var=$(client_var_name $client)_multiop_pid
67 echo client $client multiop_bg started multiop_pid=${!var}
73 local multiop_pid=$(client_var_name $client)_multiop_pid
74 local do_node_pid=$(client_var_name $client)_do_node_pid
76 echo "Stopping multiop_pid=${!multiop_pid} (kill ${!multiop_pid} on $client)"
77 do_node $client kill -USR1 ${!multiop_pid}
83 local var=${SINGLEMDS}_svc
88 fid=$(do_node $client $LFS path2fid $file)
89 do_facet $SINGLEMDS $LCTL --device ${!var} getobjversion $fid
93 cos_param_file=$TMP/rvbr-cos-params
94 save_lustre_params $(comma_list $(mdts_nodes)) "mdt.*.commit_on_sharing" > $cos_param_file
97 test_1a() { # former test_0a
98 local file=$DIR/$tfile
102 do_node $CLIENT1 mcreate $file
103 pre=$(get_version $CLIENT1 $file)
104 do_node $CLIENT1 openfile -f O_RDWR $file
105 post=$(get_version $CLIENT1 $file)
106 if (($pre != $post)); then
107 error "version changed unexpectedly: pre $pre, post $post"
110 run_test 1a "open and close do not change versions"
112 test_1b() { # former test_0b
113 local var=${SINGLEMDS}_svc
114 zconf_mount $CLIENT2 $MOUNT2
116 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
117 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
118 do_node $CLIENT1 mkdir -p -m 755 $MOUNT/$tdir
120 replay_barrier $SINGLEMDS
121 do_node $CLIENT2 chmod 777 $MOUNT2/$tdir
122 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT $MOUNT/$tdir/$tfile
123 zconf_umount $CLIENT2 $MOUNT2
124 facet_failover $SINGLEMDS
126 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
127 if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
128 error "open succeeded unexpectedly"
131 run_test 1b "open (O_CREAT) checks version of parent"
133 test_1c() { # former test_0c
134 local var=${SINGLEMDS}_svc
135 zconf_mount $CLIENT2 $MOUNT2
137 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
138 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
140 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
141 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $DIR/$tdir/$tfile
143 replay_barrier $SINGLEMDS
144 do_node $CLIENT2 chmod 0777 $MOUNT2/$tdir
145 do_node $CLIENT2 chmod 0666 $MOUNT2/$tdir/$tfile
146 rmultiop_start $CLIENT1 $DIR/$tdir/$tfile o_c
147 zconf_umount $CLIENT2 $MOUNT2
148 facet_failover $SINGLEMDS
150 client_up $CLIENT1 || error "$CLIENT1 evicted"
151 rmultiop_stop $CLIENT1 || error "close failed"
153 run_test 1c "open (non O_CREAT) does not checks versions"
155 # test set #2: CREAT (not open)
156 # - version of parent is not changed but checked
157 # - pre-version should be -1
158 # - post-version should be valid
159 test_2a() { # extended former test_0d
164 pre=$(get_version $CLIENT1 $DIR)
165 do_node $CLIENT1 mkfifo $DIR/$tfile-fifo
166 post=$(get_version $CLIENT1 $DIR)
167 if (($pre != $post)); then
168 error "version was changed: pre $pre, post $post"
171 pre=$(get_version $CLIENT1 $DIR)
172 do_node $CLIENT1 mkdir $DIR/$tfile-dir
173 post=$(get_version $CLIENT1 $DIR)
174 if (($pre != $post)); then
175 error "version was changed: pre $pre, post $post"
177 do_node $CLIENT1 rmdir $DIR/$tfile-dir
180 pre=$(get_version $CLIENT1 $DIR)
181 do_node $CLIENT1 mkfifo $DIR/$tfile-nod
182 post=$(get_version $CLIENT1 $DIR)
183 if (($pre != $post)); then
184 error "version was changed: pre $pre, post $post"
187 pre=$(get_version $CLIENT1 $DIR)
188 do_node $CLIENT1 mkfifo $DIR/$tfile-symlink
189 post=$(get_version $CLIENT1 $DIR)
190 if (($pre != $post)); then
191 error "version was changed: pre $pre, post $post"
193 do_node $CLIENT1 rm $DIR/$tfile-*
196 run_test 2a "create operations doesn't change version of parent"
198 test_2b() { # former test_0e
199 local var=${SINGLEMDS}_svc
200 zconf_mount $CLIENT2 $MOUNT2
202 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
203 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
205 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
207 replay_barrier $SINGLEMDS
208 do_node $CLIENT2 chmod 777 $MOUNT2/$tdir
209 do_node $CLIENT1 mkfifo $DIR/$tdir/$tfile
210 zconf_umount $CLIENT2 $MOUNT2
211 facet_failover $SINGLEMDS
213 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
214 if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
215 error "create succeeded unexpectedly"
218 run_test 2b "create checks version of parent"
220 test_3a() { # former test_0f
224 do_node $CLIENT1 mcreate $DIR/$tfile
225 pre=$(get_version $CLIENT1 $DIR)
226 do_node $CLIENT1 rm $DIR/$tfile
227 post=$(get_version $CLIENT1 $DIR)
228 if (($pre != $post)); then
229 error "version was changed: pre $pre, post $post"
232 run_test 3a "unlink doesn't change version of parent"
234 test_3b() { # former test_0g
235 local var=${SINGLEMDS}_svc
236 zconf_mount $CLIENT2 $MOUNT2
238 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
239 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
241 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
242 do_node $CLIENT1 mcreate $DIR/$tdir/$tfile
244 replay_barrier $SINGLEMDS
245 do_node $CLIENT2 chmod 777 $MOUNT2/$tdir
246 do_node $CLIENT1 rm $DIR/$tdir/$tfile
247 zconf_umount $CLIENT2 $MOUNT2
248 facet_failover $SINGLEMDS
250 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
251 if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
252 error "unlink succeeded unexpectedly"
255 run_test 3b "unlink checks version of parent"
257 test_4a() { # former test_0h
258 local file=$DIR/$tfile
262 do_node $CLIENT1 mcreate $file
263 pre=$(get_version $CLIENT1 $file)
264 do_node $CLIENT1 chown $RUNAS_ID $file
265 post=$(get_version $CLIENT1 $file)
266 if (($pre == $post)); then
267 error "version not changed: pre $pre, post $post"
270 run_test 4a "setattr of UID changes versions"
272 test_4b() { # former test_0i
273 local file=$DIR/$tfile
277 do_node $CLIENT1 mcreate $file
278 pre=$(get_version $CLIENT1 $file)
279 do_node $CLIENT1 chown :$RUNAS_ID $file
280 post=$(get_version $CLIENT1 $file)
281 if (($pre == $post)); then
282 error "version not changed: pre $pre, post $post"
285 run_test 4b "setattr of GID changes versions"
287 test_4c() { # former test_0j
288 local file=$DIR/$tfile
289 local var=${SINGLEMDS}_svc
290 zconf_mount $CLIENT2 $MOUNT2
292 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
293 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
295 do_node $CLIENT1 mcreate $file
297 replay_barrier $SINGLEMDS
298 do_node $CLIENT2 chown :$RUNAS_ID $MOUNT2/$tfile
299 do_node $CLIENT1 chown $RUNAS_ID $file
300 zconf_umount $CLIENT2 $MOUNT2
301 facet_failover $SINGLEMDS
303 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
304 if ! do_node $CLIENT1 $CHECKSTAT -u \\\#$UID $file; then
305 error "setattr of UID succeeded unexpectedly"
308 run_test 4c "setattr of UID checks versions"
310 test_4d() { # former test_0k
311 local file=$DIR/$tfile
312 local var=${SINGLEMDS}_svc
313 zconf_mount $CLIENT2 $MOUNT2
315 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
316 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
318 do_node $CLIENT1 mcreate $file
320 replay_barrier $SINGLEMDS
321 do_node $CLIENT2 chown $RUNAS_ID $MOUNT2/$tfile
322 do_node $CLIENT1 chown :$RUNAS_ID $file
323 zconf_umount $CLIENT2 $MOUNT2
324 facet_failover $SINGLEMDS
326 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
327 if ! do_node $CLIENT1 $CHECKSTAT -g \\\#$UID $file; then
328 error "setattr of GID succeeded unexpectedly"
331 run_test 4d "setattr of GID checks versions"
333 test_4e() { # former test_0l
334 local file=$DIR/$tfile
338 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $file
339 pre=$(get_version $CLIENT1 $file)
340 do_node $CLIENT1 chmod 666 $file
341 post=$(get_version $CLIENT1 $file)
342 if (($pre == $post)); then
343 error "version not changed: pre $pre, post $post"
346 run_test 4e "setattr of permission changes versions"
348 test_4f() { # former test_0m
349 local file=$DIR/$tfile
350 local var=${SINGLEMDS}_svc
351 zconf_mount $CLIENT2 $MOUNT2
353 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
354 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
356 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $file
358 replay_barrier $SINGLEMDS
359 do_node $CLIENT2 chown :$RUNAS_ID $MOUNT2/$tfile
360 do_node $CLIENT1 chmod 666 $file
361 zconf_umount $CLIENT2 $MOUNT2
362 facet_failover $SINGLEMDS
364 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
365 if ! do_node $CLIENT1 $CHECKSTAT -p 0644 $file; then
366 error "setattr of permission succeeded unexpectedly"
369 run_test 4f "setattr of permission checks versions"
371 test_4g() { # former test_0n
372 local file=$DIR/$tfile
376 do_node $CLIENT1 mcreate $file
377 pre=$(get_version $CLIENT1 $file)
378 do_node $CLIENT1 chattr +i $file
379 post=$(get_version $CLIENT1 $file)
380 do_node $CLIENT1 chattr -i $file
381 if (($pre == $post)); then
382 error "version not changed: pre $pre, post $post"
385 run_test 4g "setattr of flags changes versions"
393 if ((${#attr} != 1)); then
394 error "checking multiple attributes not implemented yet"
396 do_node $client lsattr $file | cut -d ' ' -f 1 | grep -q $attr
399 test_4h() { # former test_0o
400 local file=$DIR/$tfile
402 local var=${SINGLEMDS}_svc
403 zconf_mount $CLIENT2 $MOUNT2
405 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
406 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
408 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $file
410 replay_barrier $SINGLEMDS
411 do_node $CLIENT2 chmod 666 $MOUNT2/$tfile
412 do_node $CLIENT1 chattr +i $file
413 zconf_umount $CLIENT2 $MOUNT2
414 facet_failover $SINGLEMDS
416 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
417 checkattr $CLIENT1 i $file
419 do_node $CLIENT1 chattr -i $file
420 if [ $rc -eq 0 ]; then
421 error "setattr of flags succeeded unexpectedly"
424 run_test 4h "setattr of flags checks versions"
426 test_4i() { # former test_0p
427 local file=$DIR/$tfile
431 local var=${SINGLEMDS}_svc
433 ad_orig=$(do_facet $SINGLEMDS "$LCTL get_param mdd.${!var}.atime_diff")
434 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.atime_diff=0"
435 do_node $CLIENT1 mcreate $file
436 pre=$(get_version $CLIENT1 $file)
437 do_node $CLIENT1 touch $file
438 post=$(get_version $CLIENT1 $file)
440 # We don't fail MDS in this test. atime_diff shall be
441 # restored to its original value.
443 do_facet $SINGLEMDS "$LCTL set_param $ad_orig"
444 if (($pre != $post)); then
445 error "version changed unexpectedly: pre $pre, post $post"
448 run_test 4i "setattr of times does not change versions"
450 test_4j() { # former test_0q
451 local file=$DIR/$tfile
455 do_node $CLIENT1 mcreate $file
456 pre=$(get_version $CLIENT1 $file)
457 do_node $CLIENT1 truncate $file 1
458 post=$(get_version $CLIENT1 $file)
459 if (($pre != $post)); then
460 error "version changed unexpectedly: pre $pre, post $post"
463 run_test 4j "setattr of size does not change versions"
465 test_4k() { # former test_0r
466 local file=$DIR/$tfile
470 local var=${SINGLEMDS}_svc
471 zconf_mount $CLIENT2 $MOUNT2
473 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
474 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.atime_diff=0"
475 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
477 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $file
479 replay_barrier $SINGLEMDS
480 do_node $CLIENT2 chmod 666 $MOUNT2/$tfile
481 do_node $CLIENT1 truncate $file 1
483 mtime_pre=$(do_node $CLIENT1 stat --format=%Y $file)
484 do_node $CLIENT1 touch $file
485 sleep 1 # avoid stat caching
486 mtime_post=$(do_node $CLIENT1 stat --format=%Y $file)
487 zconf_umount $CLIENT2 $MOUNT2
488 facet_failover $SINGLEMDS
490 client_up $CLIENT1 || error "$CLIENT1 evicted"
491 if (($mtime_pre >= $mtime_post)); then
492 error "time not changed: pre $mtime_pre, post $mtime_post"
494 if ! do_node $CLIENT1 $CHECKSTAT -s 1 $file; then
495 error "setattr of size failed"
497 mtime=$(do_node $CLIENT1 stat --format=%Y $file)
498 if (($mtime != $mtime_post)); then
499 error "setattr of times failed: expected $mtime_post, got $mtime"
502 run_test 4k "setattr of times and size does not check versions"
504 test_5a() { # former test_0s
510 do_node $CLIENT1 mcreate $DIR/$tfile
511 do_node $CLIENT1 mkdir -p $DIR/$tdir
512 pre=$(get_version $CLIENT1 $DIR/$tfile)
513 tp_pre=$(get_version $CLIENT1 $DIR/$tdir)
514 do_node $CLIENT1 link $DIR/$tfile $DIR/$tdir/$tfile
515 post=$(get_version $CLIENT1 $DIR/$tfile)
516 tp_post=$(get_version $CLIENT1 $DIR/$tdir)
517 if (($pre == $post)); then
518 error "version of source not changed: pre $pre, post $post"
520 if (($tp_pre != $tp_post)); then
521 error "version of target parent was changed: pre $tp_pre, post $tp_post"
524 run_test 5a "link changes versions of source but not target parent"
526 test_5b() { # former test_0t
527 local var=${SINGLEMDS}_svc
528 zconf_mount $CLIENT2 $MOUNT2
530 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
531 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
533 do_node $CLIENT1 mcreate $DIR/$tfile
534 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
536 replay_barrier $SINGLEMDS
537 do_node $CLIENT2 chmod 777 $MOUNT2/$tdir
538 do_node $CLIENT1 link $DIR/$tfile $DIR/$tdir/$tfile
539 zconf_umount $CLIENT2 $MOUNT2
540 facet_failover $SINGLEMDS
542 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
543 if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
544 error "link should fail"
547 run_test 5b "link checks version of target parent"
549 test_5c() { # former test_0u
550 local var=${SINGLEMDS}_svc
551 zconf_mount $CLIENT2 $MOUNT2
553 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
554 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
556 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $DIR/$tfile
557 do_node $CLIENT1 mkdir -p $DIR/$tdir
559 replay_barrier $SINGLEMDS
560 do_node $CLIENT2 chmod 666 $MOUNT2/$tfile
561 do_node $CLIENT1 link $DIR/$tfile $DIR/$tdir/$tfile
562 zconf_umount $CLIENT2 $MOUNT2
563 facet_failover $SINGLEMDS
565 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
566 if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
567 error "link should fail"
570 run_test 5c "link checks version of source"
572 test_6a() { # former test_0v
578 do_node $CLIENT1 mcreate $DIR/$tfile
579 do_node $CLIENT1 mkdir -p $DIR/$tdir
580 sp_pre=$(get_version $CLIENT1 $DIR)
581 tp_pre=$(get_version $CLIENT1 $DIR/$tdir)
582 do_node $CLIENT1 mv $DIR/$tfile $DIR/$tdir/$tfile
583 sp_post=$(get_version $CLIENT1 $DIR)
584 tp_post=$(get_version $CLIENT1 $DIR/$tdir)
585 if (($sp_pre != $sp_post)); then
586 error "version of source parent was changed: pre $sp_pre, post $sp_post"
588 if (($tp_pre != $tp_post)); then
589 error "version of target parent was changed: pre $tp_pre, post $tp_post"
592 run_test 6a "rename doesn't change versions of source parent and target parent"
594 test_6b() { # former test_0w
598 do_node $CLIENT1 mcreate $DIR/$tfile
599 pre=$(get_version $CLIENT1 $DIR)
600 do_node $CLIENT1 mv $DIR/$tfile $DIR/$tfile-new
601 post=$(get_version $CLIENT1 $DIR)
602 if (($pre != $post)); then
603 error "version of parent was changed: pre $pre, post $post"
606 run_test 6b "rename within same dir doesn't change version of parent"
608 test_6c() { # former test_0x
609 local var=${SINGLEMDS}_svc
610 zconf_mount $CLIENT2 $MOUNT2
612 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
613 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
615 do_node $CLIENT1 mcreate $DIR/$tfile
616 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
618 replay_barrier $SINGLEMDS
619 do_node $CLIENT2 chmod 777 $MOUNT2
620 do_node $CLIENT1 mv $DIR/$tfile $DIR/$tdir/$tfile
621 zconf_umount $CLIENT2 $MOUNT2
622 facet_failover $SINGLEMDS
624 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
625 if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tfile; then
626 error "rename should fail"
629 run_test 6c "rename checks version of source parent"
631 test_6d() { # former test_0y
632 local var=${SINGLEMDS}_svc
633 zconf_mount $CLIENT2 $MOUNT2
635 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
636 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
638 do_node $CLIENT1 mcreate $DIR/$tfile
639 do_node $CLIENT1 mkdir -p -m 755 $DIR/$tdir
641 replay_barrier $SINGLEMDS
642 do_node $CLIENT2 chmod 777 $MOUNT2/$tdir
643 do_node $CLIENT1 mv $DIR/$tfile $DIR/$tdir/$tfile
644 zconf_umount $CLIENT2 $MOUNT2
645 facet_failover $SINGLEMDS
647 client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
648 if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tfile; then
649 error "rename should fail"
652 run_test 6d "rename checks version of target parent"
654 # pdirops tests, bug 18143
660 local var=${SINGLEMDS}_svc
661 zconf_mount $CLIENT2 $MOUNT2
663 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
664 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
666 do_node $CLIENT1 mkdir -p $DIR/$tdir
667 replay_barrier $SINGLEMDS
669 do_node $CLIENT1 $first || error "Cannot do first operation"
670 # client2 operations that will be lost
671 do_node $CLIENT2 $lost || error "Cannot do 'lost' operations"
673 do_node $CLIENT1 $last || error "Cannot do last operation"
674 zconf_umount $CLIENT2 $MOUNT2
675 facet_failover $SINGLEMDS
676 # should fail as conflict expected
677 client_evicted $CLIENT1 || rc=1
679 wait_recovery_complete $SINGLEMDS
680 wait_mds_ost_sync $SINGLEMDS
687 first="createmany -o $DIR/$tdir/$tfile- 1"
688 lost="rm $MOUNT2/$tdir/$tfile-0"
689 last="createmany -o $DIR/$tdir/$tfile- 1"
690 test_7_cycle "$first" "$lost" "$last" || error "Test 7a.1 failed"
692 first="createmany -o $DIR/$tdir/$tfile- 1"
693 lost="rm $MOUNT2/$tdir/$tfile-0"
694 last="mkdir $DIR/$tdir/$tfile-0"
695 test_7_cycle "$first" "$lost" "$last" || error "Test 7a.2 failed"
697 first="mkdir $DIR/$tdir/$tfile-0"
698 lost="mv $MOUNT2/$tdir/$tfile-0 $MOUNT2/$tdir/$tfile-1"
699 last="createmany -o $DIR/$tdir/$tfile- 1"
700 test_7_cycle "$first" "$lost" "$last" || error "Test 7a.3 failed"
703 run_test 7a "create, {lost}, create"
706 first="createmany -o $DIR/$tdir/$tfile- 1"
707 lost="rm $MOUNT2/$tdir/$tfile-0; createmany -o $MOUNT2/$tdir/$tfile- 1"
708 last="rm $DIR/$tdir/$tfile-0"
709 test_7_cycle "$first" "$lost" "$last" || error "Test 7b.1 failed"
711 first="createmany -o $DIR/$tdir/$tfile- 1"
712 lost="touch $MOUNT2/$tdir/$tfile; mv $MOUNT2/$tdir/$tfile $MOUNT2/$tdir/$tfile-0"
713 last="rm $DIR/$tdir/$tfile-0"
714 test_7_cycle "$first" "$lost" "$last" || error "Test 7b.2 failed"
716 first="createmany -o $DIR/$tdir/$tfile- 1"
717 lost="rm $MOUNT2/$tdir/$tfile-0; mkdir $MOUNT2/$tdir/$tfile-0"
718 last="rmdir $DIR/$tdir/$tfile-0"
719 test_7_cycle "$first" "$lost" "$last" || error "Test 7b.3 failed"
722 run_test 7b "create, {lost}, unlink"
725 first="createmany -o $DIR/$tdir/$tfile- 1"
726 lost="rm $MOUNT2/$tdir/$tfile-0; createmany -o $MOUNT2/$tdir/$tfile- 1"
727 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
728 test_7_cycle "$first" "$lost" "$last" || error "Test 7c.1 failed"
730 first="createmany -o $DIR/$tdir/$tfile- 2"
731 lost="rm $MOUNT2/$tdir/$tfile-0; mkdir $MOUNT2/$tdir/$tfile-0"
732 last="mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
733 test_7_cycle "$first" "$lost" "$last" || error "Test 7c.2 failed"
735 first="createmany -o $DIR/$tdir/$tfile- 1; mkdir $DIR/$tdir/$tfile-1-0"
736 lost="rmdir $MOUNT2/$tdir/$tfile-1-0; createmany -o $MOUNT2/$tdir/$tfile-1- 1"
737 last="mv $DIR/$tdir/$tfile-1-0 $DIR/$tdir/$tfile-0"
738 test_7_cycle "$first" "$lost" "$last" || error "Test 7c.3 failed"
740 first="createmany -o $DIR/$tdir/$tfile- 1"
741 lost="mv $MOUNT2/$tdir/$tfile-0 $MOUNT2/$tdir/$tfile"
742 last="mv $DIR/$tdir/$tfile $DIR/$tdir/$tfile-0"
743 test_7_cycle "$first" "$lost" "$last" || error "Test 7c.4 failed"
746 run_test 7c "create, {lost}, rename"
749 first="createmany -o $DIR/$tdir/$tfile- 1; rm $DIR/$tdir/$tfile-0"
750 lost="createmany -o $MOUNT2/$tdir/$tfile- 1; rm $MOUNT2/$tdir/$tfile-0"
751 last="createmany -o $DIR/$tdir/$tfile- 1"
752 test_7_cycle "$first" "$lost" "$last" && error "Test 7d.1 failed"
754 first="createmany -o $DIR/$tdir/$tfile- 1; rm $DIR/$tdir/$tfile-0"
755 lost="mkdir $MOUNT2/$tdir/$tfile-0; rmdir $MOUNT2/$tdir/$tfile-0"
756 last="mkdir $DIR/$tdir/$tfile-0"
757 test_7_cycle "$first" "$lost" "$last" && error "Test 7d.2 failed"
759 first="mkdir $DIR/$tdir/$tfile-0; rmdir $DIR/$tdir/$tfile-0"
760 lost="createmany -o $MOUNT2/$tdir/$tfile- 1; mv $MOUNT2/$tdir/$tfile-0 $MOUNT2/$tdir/$tfile-1"
761 last="createmany -o $DIR/$tdir/$tfile- 1"
762 test_7_cycle "$first" "$lost" "$last" && error "Test 7d.3 failed"
765 run_test 7d "unlink, {lost}, create"
768 first="createmany -o $DIR/$tdir/$tfile- 1; rm $DIR/$tdir/$tfile-0"
769 lost="createmany -o $MOUNT2/$tdir/$tfile- 1; rm $MOUNT2/$tdir/$tfile-0;createmany -o $MOUNT2/$tdir/$tfile- 1"
770 last="rm $DIR/$tdir/$tfile-0"
771 test_7_cycle "$first" "$lost" "$last" || error "Test 7e.1 failed"
773 first="mkdir $DIR/$tdir/$tfile-0; rmdir $DIR/$tdir/$tfile-0"
774 lost="mkdir $MOUNT2/$tdir/$tfile-0; rmdir $MOUNT2/$tdir/$tfile-0; mkdir $MOUNT2/$tdir/$tfile-0"
775 last="rmdir $DIR/$tdir/$tfile-0"
776 test_7_cycle "$first" "$lost" "$last" || error "Test 7e.2 failed"
778 first="createmany -o $DIR/$tdir/$tfile- 1; rm $DIR/$tdir/$tfile-0"
779 lost="mkdir $MOUNT2/$tdir/$tfile-0"
780 last="rmdir $DIR/$tdir/$tfile-0"
781 test_7_cycle "$first" "$lost" "$last" || error "Test 7e.3 failed"
783 first="mkdir $DIR/$tdir/$tfile-0; rmdir $DIR/$tdir/$tfile-0"
784 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
785 last="rm $DIR/$tdir/$tfile-0"
786 test_7_cycle "$first" "$lost" "$last" || error "Test 7e.4 failed"
788 first="createmany -o $DIR/$tdir/$tfile- 2; rm $DIR/$tdir/$tfile-0"
789 lost="mv $MOUNT2/$tdir/$tfile-1 $MOUNT2/$tdir/$tfile-0"
790 last="rm $DIR/$tdir/$tfile-0"
791 test_7_cycle "$first" "$lost" "$last" || error "Test 7e.5 failed"
794 run_test 7e "unlink, {lost}, unlink"
797 first="createmany -o $DIR/$tdir/$tfile- 1; rm $DIR/$tdir/$tfile-0"
798 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
799 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
800 test_7_cycle "$first" "$lost" "$last" || error "Test 7f.1 failed"
802 first="createmany -o $DIR/$tdir/$tfile- 2; rm $DIR/$tdir/$tfile-0"
803 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
804 last="mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
805 test_7_cycle "$first" "$lost" "$last" || error "Test 7f.2 failed"
807 first="mkdir $DIR/$tdir/$tfile; createmany -o $DIR/$tdir/$tfile- 1; rmdir $DIR/$tdir/$tfile"
808 lost="mkdir $MOUNT2/$tdir/$tfile"
809 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
810 test_7_cycle "$first" "$lost" "$last" || error "Test 7f.3 failed"
812 first="createmany -o $DIR/$tdir/$tfile- 2; rm $DIR/$tdir/$tfile-0"
813 lost="mv $MOUNT2/$tdir/$tfile-1 $MOUNT2/$tdir/$tfile-0"
814 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
815 test_7_cycle "$first" "$lost" "$last" || error "Test 7f.4 failed"
817 first="createmany -o $DIR/$tdir/$tfile- 2; rm $DIR/$tdir/$tfile-0"
818 lost="mkdir $MOUNT2/$tdir/$tfile-0"
819 last="mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
820 test_7_cycle "$first" "$lost" "$last" || error "Test 7f.5 failed"
823 run_test 7f "unlink, {lost}, rename"
826 first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
827 lost="mkdir $MOUNT2/$tdir/$tfile-0;rmdir $MOUNT2/$tdir/$tfile-0"
828 last="createmany -o $DIR/$tdir/$tfile- 1"
829 test_7_cycle "$first" "$lost" "$last" && error "Test 7g.1 failed"
831 first="createmany -o $DIR/$tdir/$tfile- 2; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
832 lost="createmany -o $MOUNT2/$tdir/$tfile- 1; rm $MOUNT2/$tdir/$tfile-0"
833 last="mkdir $DIR/$tdir/$tfile-0"
834 test_7_cycle "$first" "$lost" "$last" && error "Test 7g.2 failed"
836 first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
837 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
838 last="link $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
839 test_7_cycle "$first" "$lost" "$last" || error "Test 7g.3 failed"
842 run_test 7g "rename, {lost}, create"
845 first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
846 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
847 last="rm $DIR/$tdir/$tfile-0"
848 test_7_cycle "$first" "$lost" "$last" || error "Test 7h.1 failed"
850 first="createmany -o $DIR/$tdir/$tfile- 2; mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
851 lost="rm $MOUNT2/$tdir/$tfile-0; createmany -o $MOUNT2/$tdir/$tfile- 1"
852 last="rm $DIR/$tdir/$tfile-0"
853 test_7_cycle "$first" "$lost" "$last" || error "Test 7h.2 failed"
855 first="createmany -o $DIR/$tdir/$tfile- 1; mkdir $DIR/$tdir/$tfile; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
856 lost="rm $MOUNT2/$tdir/$tfile/$tfile-0"
857 last="rmdir $DIR/$tdir/$tfile"
858 #test_7_cycle "$first" "$lost" "$last" || error "Test 7h.3 failed"
861 run_test 7h "rename, {lost}, unlink"
864 first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
865 lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
866 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
867 test_7_cycle "$first" "$lost" "$last" || error "Test 7i.1 failed"
869 first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
870 lost="mkdir $MOUNT2/$tdir/$tfile-0"
871 last="mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
872 test_7_cycle "$first" "$lost" "$last" || error "Test 7i.1 failed"
874 first="createmany -o $DIR/$tdir/$tfile- 3; mv $DIR/$tdir/$tfile-1 $DIR/$tdir/$tfile-0"
875 lost="mv $MOUNT2/$tdir/$tfile-2 $MOUNT2/$tdir/$tfile-0"
876 last="mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-2"
877 test_7_cycle "$first" "$lost" "$last" || error "Test 7i.3 failed"
879 first="createmany -o $DIR/$tdir/$tfile- 2; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
880 lost="rm $MOUNT2/$tdir/$tfile-1"
881 last="mv $DIR/$tdir/$tfile $DIR/$tdir/$tfile-1"
882 test_7_cycle "$first" "$lost" "$last" || error "Test 7i.4 failed"
885 run_test 7i "rename, {lost}, rename"
887 # test set #8: orphan handling bug 15392.
888 # Unlink during recovery creates orphan always just in case some late open may
889 # arrive. These orphans will be removed after recovery anyway.
890 # Tests check that valid create,unlink,create sequence will work in this case
891 # too but not fail on second create due to orphan found.
894 local var=${SINGLEMDS}_svc
895 zconf_mount $CLIENT2 $MOUNT2
897 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
899 do_node $CLIENT1 mcreate $DIR/$tfile
900 do_node $CLIENT1 mkdir $DIR/$tfile-2
901 replay_barrier $SINGLEMDS
902 # missed replay from client2 will lead to recovery by versions
903 do_node $CLIENT2 touch $MOUNT2/$tfile-2/$tfile
904 do_node $CLIENT1 rm $DIR/$tfile || return 1
905 do_node $CLIENT1 touch $DIR/$tfile || return 2
907 zconf_umount $CLIENT2 $MOUNT2
908 facet_failover $SINGLEMDS
909 client_up $CLIENT1 || return 6
911 do_node $CLIENT1 rm $DIR/$tfile || error "$tfile doesn't exists"
914 run_test 8a "create | unlink, create shouldn't fail"
917 local var=${SINGLEMDS}_svc
918 zconf_mount $CLIENT2 $MOUNT2
920 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
922 do_node $CLIENT1 touch $DIR/$tfile
923 do_node $CLIENT1 mkdir $DIR/$tfile-2
924 replay_barrier $SINGLEMDS
925 # missed replay from client2 will lead to recovery by versions
926 do_node $CLIENT2 touch $MOUNT2/$tfile-2/$tfile
927 do_node $CLIENT1 rm -f $MOUNT1/$tfile || return 1
928 do_node $CLIENT1 mcreate $MOUNT1/$tfile || return 2
930 zconf_umount $CLIENT2 $MOUNT2
931 facet_failover $SINGLEMDS
932 client_up $CLIENT1 || return 6
934 do_node $CLIENT1 rm $MOUNT1/$tfile || error "$tfile doesn't exists"
937 run_test 8b "create | unlink, create shouldn't fail"
940 local var=${SINGLEMDS}_svc
941 zconf_mount $CLIENT2 $MOUNT2
943 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
945 do_node $CLIENT1 touch $DIR/$tfile
946 do_node $CLIENT1 mkdir $DIR/$tfile-2
947 replay_barrier $SINGLEMDS
948 # missed replay from client2 will lead to recovery by versions
949 do_node $CLIENT2 touch $MOUNT2/$tfile-2/$tfile
950 do_node $CLIENT1 rm -f $MOUNT1/$tfile || return 1
951 do_node $CLIENT1 mkdir $MOUNT1/$tfile || return 2
953 zconf_umount $CLIENT2 $MOUNT2
954 facet_failover $SINGLEMDS
955 client_up $CLIENT1 || return 6
957 do_node $CLIENT1 rmdir $MOUNT1/$tfile || error "$tfile doesn't exists"
960 run_test 8c "create | unlink, create shouldn't fail"
963 # This test uses three Lustre clients on two hosts.
965 # Lustre Client 1: $CLIENT1:$MOUNT ($DIR)
966 # Lustre Client 2: $CLIENT2:$MOUNT2 ($DIR2)
967 # Lustre Client 3: $CLIENT2:$MOUNT1 ($DIR1)
969 test_10b() { # former test_2b
972 local var=${SINGLEMDS}_svc
974 [ -n "$CLIENTS" ] || { skip "Need two or more clients" && exit 0; }
975 [ $CLIENTCOUNT -ge 2 ] || \
976 { skip "Need two or more clients, have $CLIENTCOUNT" && exit 0; }
978 do_facet $SINGLEMDS "$LCTL set_param mdd.${!var}.sync_permission=0"
979 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
981 zconf_mount $CLIENT1 $MOUNT
982 zconf_mount $CLIENT2 $MOUNT1
983 zconf_mount $CLIENT2 $MOUNT2
984 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $DIR/$tfile-a
985 do_node $CLIENT1 openfile -f O_RDWR:O_CREAT -m 0644 $DIR/$tfile-b
988 # Save an MDT transaction number before recovery.
990 do_node $CLIENT1 touch $DIR1/$tfile
991 pre=$(get_version $CLIENT1 $DIR/$tfile)
994 # Comments on the replay sequence state the expected result
998 # "U" Unable to replay.
1001 replay_barrier $SINGLEMDS
1002 do_node $CLIENT1 chmod 666 $DIR/$tfile-a # R
1003 do_node $CLIENT2 chmod 666 $DIR1/$tfile-b # R
1004 do_node $CLIENT2 chown :$RUNAS_ID $DIR2/$tfile-a # U
1005 do_node $CLIENT1 chown $RUNAS_ID $DIR/$tfile-a # J
1006 do_node $CLIENT2 truncate $DIR2/$tfile-b 1 # U
1007 do_node $CLIENT2 chown :$RUNAS_ID $DIR1/$tfile-b # R
1008 do_node $CLIENT1 chown $RUNAS_ID $DIR/$tfile-b # R
1009 zconf_umount $CLIENT2 $MOUNT2
1010 facet_failover $SINGLEMDS
1012 client_evicted $CLIENT1 || error "$CLIENT1:$MOUNT not evicted"
1013 client_up $CLIENT2 || error "$CLIENT2:$MOUNT1 evicted"
1016 # Check the MDT epoch. $post must be the first transaction
1017 # number assigned after recovery.
1019 do_node $CLIENT2 chmod 666 $DIR1/$tfile
1020 post=$(get_version $CLIENT2 $DIR1/$tfile)
1021 if (($(($pre >> 32)) == $((post >> 32)))); then
1022 error "epoch not changed: pre $pre, post $post"
1025 if (($(($post & 0x00000000ffffffff)) != 1)); then
1026 error "transno should restart from one: got $post"
1029 do_node $CLIENT2 stat $DIR1/$tfile-a
1030 do_node $CLIENT2 stat $DIR1/$tfile-b
1032 do_node $CLIENT2 $CHECKSTAT -p 0666 -u \\\#$UID -g \\\#$UID \
1033 $DIR1/$tfile-a || error "$DIR/$tfile-a: unexpected state"
1034 do_node $CLIENT2 $CHECKSTAT -p 0666 -u \\\#$RUNAS_ID -g \\\#$RUNAS_ID \
1035 $DIR1/$tfile-b || error "$DIR/$tfile-b: unexpected state"
1037 zconf_umount $CLIENT2 $MOUNT1
1039 run_test 10b "3 clients: some, none, and all reqs replayed"
1041 # test set #11: operations in single directory
1043 local var=${SINGLEMDS}_svc
1044 zconf_mount $CLIENT2 $MOUNT2
1046 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
1048 replay_barrier $SINGLEMDS
1050 do_node $CLIENT1 createmany -o $DIR/$tfile-1- 100 &
1052 do_node $CLIENT2 createmany -o $MOUNT2/$tfile-2- 100
1053 zconf_umount $CLIENT2 $MOUNT2
1056 facet_failover $SINGLEMDS
1057 # recovery shouldn't fail due to missing client 2
1058 client_up $CLIENT1 || return 1
1059 # All files from client1 should have been replayed
1060 do_node $CLIENT1 unlinkmany $DIR/$tfile-1- 100 || return 2
1062 [ -e $DIR/$tdir/$tfile-2-0 ] && error "$tfile-2-0 exists"
1065 run_test 11a "concurrent creates don't affect each other"
1068 local var=${SINGLEMDS}_svc
1069 zconf_mount $CLIENT2 $MOUNT2
1071 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
1073 do_node $CLIENT2 createmany -o $MOUNT2/$tfile-2- 100
1075 replay_barrier $SINGLEMDS
1076 do_node $CLIENT1 createmany -o $DIR/$tfile-1- 100 &
1078 do_node $CLIENT2 unlinkmany -o $MOUNT2/$tfile-2- 100
1079 zconf_umount $CLIENT2 $MOUNT2
1082 facet_failover $SINGLEMDS
1083 # recovery shouldn't fail due to missing client 2
1084 client_up $CLIENT1 || return 1
1085 # All files from client1 should have been replayed
1086 do_node $CLIENT1 unlinkmany $DIR/$tfile-1- 100 || return 2
1088 [ -e $DIR/$tdir/$tfile-2-0 ] && error "$tfile-2-0 exists"
1091 run_test 11b "concurrent creates and unlinks don't affect each other"
1093 # test set #12: lock replay with VBR, bug 16356
1094 test_12a() { # former test_2a
1095 local var=${SINGLEMDS}_svc
1096 zconf_mount $CLIENT2 $MOUNT2
1098 do_facet $SINGLEMDS "$LCTL set_param mdt.${!var}.commit_on_sharing=0"
1100 do_node $CLIENT2 mkdir -p $MOUNT2/$tdir
1101 replay_barrier $SINGLEMDS
1102 do_node $CLIENT2 mcreate $MOUNT2/$tdir/$tfile
1103 do_node $CLIENT1 createmany -o $DIR/$tfile- 25
1104 #client1 read data from client2 which will be lost
1105 do_node $CLIENT1 $CHECKSTAT $DIR/$tdir/$tfile
1106 do_node $CLIENT1 createmany -o $DIR/$tfile-3- 25
1107 zconf_umount $CLIENT2 $MOUNT2
1109 facet_failover $SINGLEMDS
1110 # recovery shouldn't fail due to missing client 2
1111 client_up $CLIENT1 || return 1
1113 # All 50 files should have been replayed
1114 do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
1115 do_node $CLIENT1 unlinkmany $DIR/$tfile-3- 25 || return 3
1116 do_node $CLIENT1 $CHECKSTAT $DIR/$tdir/$tfile && return 4
1120 run_test 12a "lost data due to missed REMOTE client during replay"
1122 #restore COS setting
1123 restore_lustre_params < $cos_param_file
1124 rm -f $cos_param_file
1126 [ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR
1128 equals_msg `basename $0`: test complete, cleaning up
1129 check_and_cleanup_lustre
1130 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true