Whamcloud - gitweb
LU-17705 ptlrpc: replace synchronize_rcu() with rcu_barrier()
[fs/lustre-release.git] / lustre / tests / lustre-rsync-test.sh
1 #!/bin/bash
2 #
3 # Run select tests by setting ONLY, or as arguments to the script.
4 # Skip specific tests by setting EXCEPT.
5 #
6 set -e
7
8 ONLY=${ONLY:-"$*"}
9
10 KILL=/bin/kill
11 LREPL_LOG=$TMP/lustre_rsync.log
12 ORIG_PWD=${PWD}
13
14 LUSTRE=${LUSTRE:-$(dirname $0)/..}
15 . $LUSTRE/tests/test-framework.sh
16 init_test_env "$@"
17 init_logging
18
19 ALWAYS_EXCEPT="$LRSYNC_EXCEPT "
20 # bug number for skipped test: LU-4256
21 ALWAYS_EXCEPT+="               2b"
22 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
23
24 build_test_filter
25
26 [ -n "$FILESET" ] && skip "Not functional for FILESET set"
27
28 check_and_setup_lustre
29
30 DIR=${DIR:-$MOUNT}
31 assert_DIR
32
33 if getent group nobody; then
34         GROUP=nobody
35 elif getent group nogroup; then
36         GROUP=nogroup
37 else
38         error "No generic nobody group"
39 fi
40
41 export LRSYNC=${LRSYNC:-"$LUSTRE/utils/lustre_rsync"}
42 [ ! -f "$LRSYNC" ] && export LRSYNC=$(which lustre_rsync)
43 export LRSYNC="$LRSYNC -v -c no -d 2"
44
45 # Number of seconds to run dbench
46 DBENCH_TIME=${DBENCH_TIME:-60}
47 TGT=$TMP/target
48 TGT2=$TMP/target2
49 MDT0=$($LCTL get_param -n mdc.*.mds_server_uuid |
50         awk '{ gsub(/_UUID/,""); print $1 }' | head -n1)
51
52 init_changelog() {
53         changelog_register || error "changelog_register failed"
54         CL_USER=(${CL_USERS[$SINGLEMDS]})
55         echo $MDT0: Registered changelog user $CL_USER
56         [ -z $CL_USER ] &&
57                 echo "No changelog users present on $SINGLEMDS"
58 }
59
60 fini_changelog() {
61         changelog_clear
62         changelog_deregister
63 }
64
65 init_src() {
66         rm -rf $TGT/$tdir $TGT/d*.lustre_rsync-test 2> /dev/null
67         rm -rf $TGT2/$tdir $TGT2/d*.lustre_rsync-test 2> /dev/null
68         rm -rf ${DIR}/$tdir $DIR/d*.lustre_rsync-test ${DIR}/tgt 2> /dev/null
69         rm -f $LREPL_LOG
70
71         mkdir_on_mdt0 $DIR/$tdir || error "Failed to create target: " $DIR/$tdir
72         mkdir -p ${TGT}/$tdir || error "Failed to create target: " $TGT/$tdir
73         mkdir -p ${TGT2}/$tdir || error "Failed to create target: " $TGT2/$tdir
74 }
75
76 cleanup_src_tgt() {
77         [ ! -d $TGT2/$tdir ] || rm -rf $TGT2/$tdir # /tmp/target2/...
78         [ ! -d $TGT/$tdir ] || rm -rf $TGT/$tdir # /tmp/target/...
79         rm -rf $DIR/$tdir  # /mnt/lustre/...
80         rm -rf $DIR/tgt    # /mnt/lustre/tgt
81 }
82
83 # Check whether the filesystem supports xattr or not.
84 # Return value:
85 # "large" - large xattr is supported
86 # "small" - large xattr is unsupported but small xattr is supported
87 # "no"    - xattr is unsupported
88 check_xattr() {
89         local tgt=$1
90         local xattr="no"
91
92         touch $tgt
93
94         local val="$(generate_string $(max_xattr_size))"
95
96         if large_xattr_enabled &&
97                 setfattr -n user.foo -v $val $tgt 2>/dev/null; then
98                 xattr="large"
99         else
100                 setfattr -n user.foo -v bar $tgt 2>/dev/null && xattr="small"
101         fi
102
103         rm -f $tgt
104         echo $xattr
105 }
106
107 check_diff() {
108         local changelog_file=$(generate_logname "changelog")
109
110         if [ -e $1 -o -e $2 ]; then
111                 diff -rq -x "dev1" $1 $2
112                 local RC=$?
113                 if [ $RC -ne 0 ]; then
114                         $LFS changelog $MDT0 > $changelog_file
115                         error "Failure in replication; differences found."
116                 fi
117         fi
118 }
119
120 procs_are_stopped() {
121         local pids="$*"
122         local state
123
124         for state in $(ps -p "$pids" -o state=); do
125                 if [[ "$state" != T ]]; then
126                         return 1
127                 fi
128         done
129
130         return 0
131 }
132
133 # Send SIGSTOP to PIDs and wait up to 60 seconds for them to show a
134 # stopped process state.
135 stop_procs() {
136         local pids="$*"
137         local end
138
139         $KILL -SIGSTOP $pids
140         end=$((SECONDS + 60))
141         while ((SECONDS < end)); do
142                 if procs_are_stopped $pids; then
143                         return 0
144                 fi
145
146                 sleep 1
147         done
148
149         return 1
150 }
151
152 # Test 1A - test basic operations
153 test_1A() { # was test_1
154         init_src
155         init_changelog
156         local xattr=$(check_xattr $TGT/foo)
157
158         # Directory create
159         mkdir $DIR/$tdir/d1
160         mkdir $DIR/$tdir/d2
161
162         # File create
163         touch $DIR/$tdir/file1
164         cp /etc/hosts  $DIR/$tdir/d1/
165         touch $DIR/$tdir/d1/"space in filename"
166         touch $DIR/$tdir/d1/file2
167
168         # File rename
169         mv $DIR/$tdir/d1/file2 $DIR/$tdir/d2/file3
170
171         # File and directory delete
172         touch $DIR/$tdir/d1/file4
173         mkdir $DIR/$tdir/d1/del
174         touch $DIR/$tdir/d1/del/del1
175         touch $DIR/$tdir/d1/del/del2
176         rm -rf $DIR/$tdir/d1/del
177         rm $DIR/$tdir/d1/file4
178
179         # Hard and soft links
180         cat /etc/hosts > $DIR/$tdir/d1/link1
181         ln $DIR/$tdir/d1/link1  $DIR/$tdir/d1/link2
182         ln -s $DIR/$tdir/d1/link1  $DIR/$tdir/d1/link3
183
184         # Device files
185         #mknod $DIR/$tdir/dev1 b 8 1
186
187         # Replicate
188         local LRSYNC_LOG=$(generate_logname "lrsync_log")
189         echo "Replication #1"
190         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
191                 -D $LRSYNC_LOG
192
193         # Set attributes
194         chmod 000 $DIR/$tdir/d2/file3
195         chown nobody:$GROUP $DIR/$tdir/d2/file3
196
197         # Set xattrs
198         if [[ "$xattr" != "no" ]]; then
199                 local value
200                 touch $DIR/$tdir/file5
201                 [[ "$xattr" = "large" ]] &&
202                         value="$(generate_string $(max_xattr_size))" || value="bar"
203                 setfattr -n user.foo -v $value $DIR/$tdir/file5 ||
204                         error "setfattr failed"
205         fi
206
207         echo "Replication #2"
208         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
209
210         if [[ "$xattr" != "no" ]]; then
211                 local xval1=$(get_xattr_value user.foo $TGT/$tdir/file5)
212                 local xval2=$(get_xattr_value user.foo $TGT2/$tdir/file5)
213
214                 if [[ "$xval1" != "$value" || "$xval2" != "$value" ]]; then
215                         error "Error in replicating xattrs."
216                 fi
217         fi
218
219         # Use diff to compare the source and the destination
220         check_diff $DIR/$tdir $TGT/$tdir
221         check_diff $DIR/$tdir $TGT2/$tdir
222
223         fini_changelog
224         cleanup_src_tgt
225 }
226 run_test 1A "Simple Replication"
227
228 # Test 1a - test create/delete operations in ROOT directory
229 test_1a() { # LU-5005
230         rm -rf $TGT/root-* 2> /dev/null
231         rm -rf $DIR/root-* 2> /dev/null
232         init_src
233         init_changelog
234
235         # Directory create
236         mkdir_on_mdt0 $DIR/root-dir
237
238         # File create
239         touch $DIR/root-file
240         touch $DIR/root-file2
241
242         # File rename
243         mv $DIR/root-file2 $DIR/root-file3
244
245         # File and directory delete
246         touch $DIR/root-file4
247         mkdir_on_mdt0 $DIR/root-dir1
248         rm $DIR/root-file4
249         rm -rf $DIR/root-dir1
250
251         # Replicate
252         local LRSYNC_LOG=$(generate_logname "lrsync_log")
253         echo "Replication"
254         $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG \
255                 -D $LRSYNC_LOG
256
257         # Verify
258         stat $TGT/root-dir || error "Dir create not replicated"
259         stat $TGT/root-file || error "File create not replicated"
260         stat $TGT/root-file2 && error "Rename not replicated (src)"
261         stat $TGT/root-file3 || error "Rename not replicated (tgt)"
262         stat $TGT/root-dir1 && error "Dir delete not replicated"
263         stat $TGT/root-file4 && error "File delete not replicated"
264
265         cleanup_src_tgt
266         fini_changelog
267         rm -fr $TGT/root-*
268         rm -fr $DIR/root-*
269         return 0
270 }
271 run_test 1a "Replicate create/delete operations in ROOT directory"
272
273 # Test 2a - Replicate files created by dbench
274 test_2a() {
275         init_src
276         init_changelog
277
278         # Run dbench
279         bash rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME ||
280                 error "dbench failed"
281
282         local LRSYNC_LOG=$(generate_logname "lrsync_log")
283         # Replicate the changes to $TGT
284         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
285                 -D $LRSYNC_LOG
286
287         # Use diff to compare the source and the destination
288         check_diff $DIR/$tdir $TGT/$tdir
289         check_diff $DIR/$tdir $TGT2/$tdir
290
291         fini_changelog
292         cleanup_src_tgt
293         return 0
294 }
295 run_test 2a "Replicate files created by dbench."
296
297 # Test 2b - Replicate files changed by dbench.
298 test_2b() {
299         local child_pid
300         init_src
301         init_changelog
302
303         # Run dbench
304         bash rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
305         # wait for dbench to start
306         wait_for_function 'child_pid=$(pgrep dbench)' 360
307         # let dbench run for a bit
308         sleep 10
309
310         echo PIDs: $child_pid
311         echo Stopping dbench
312         stop_procs $child_pid
313
314         local LRSYNC_LOG=$(generate_logname "lrsync_log")
315         echo Starting replication
316         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
317                 -D $LRSYNC_LOG
318         check_diff $DIR/$tdir $TGT/$tdir
319
320         echo Resuming dbench
321         $KILL -SIGCONT $child_pid
322         sleep 10
323
324         echo Stopping dbench
325         stop_procs $child_pid
326
327         echo Starting replication
328         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
329         check_diff $DIR/$tdir $TGT/$tdir
330
331         echo "Wait for dbench to finish"
332         $KILL -SIGCONT $child_pid
333         wait
334
335         # Replicate the changes to $TGT
336         echo Starting replication
337         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
338
339         check_diff $DIR/$tdir $TGT/$tdir
340         check_diff $DIR/$tdir $TGT2/$tdir
341
342         fini_changelog
343         cleanup_src_tgt
344         return 0
345 }
346 run_test 2b "Replicate files changed by dbench."
347
348 # Test 2c - Replicate files while dbench is running
349 test_2c() {
350         init_src
351         init_changelog
352
353         # Run dbench
354         bash rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
355
356         local LRSYNC_LOG=$(generate_logname "lrsync_log")
357         # Replicate the changes to $TGT
358         sleep 10 # give dbench a headstart
359         local quit=0
360         while [ $quit -le 1 ];
361         do
362                 echo "Running lustre_rsync"
363                 $LRSYNC -s $DIR -t $TGT -t $TGT2 -m ${mds1_svc} -u $CL_USER \
364                         -l $LREPL_LOG -D $LRSYNC_LOG
365                 sleep 5
366                 pgrep dbench
367                 if [ $? -ne 0 ]; then
368                         quit=$(expr $quit + 1)
369                 fi
370         done
371
372         # Use diff to compare the source and the destination
373         check_diff $DIR/$tdir $TGT/$tdir
374         check_diff $DIR/$tdir $TGT2/$tdir
375
376         fini_changelog
377         cleanup_src_tgt
378         return 0
379 }
380 run_test 2c "Replicate files while dbench is running."
381
382 # Test 3a - Replicate files created by createmany
383 test_3a() {
384         init_src
385         init_changelog
386
387         local numfiles=1000
388         createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed"
389
390         local LRSYNC_LOG=$(generate_logname "lrsync_log")
391         # Replicate the changes to $TGT
392         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
393                 -D $LRSYNC_LOG
394         check_diff $DIR/$tdir $TGT/$tdir
395         check_diff $DIR/$tdir $TGT2/$tdir
396
397         fini_changelog
398         cleanup_src_tgt
399         return 0
400 }
401 run_test 3a "Replicate files created by createmany"
402
403 # Test 3b - Replicate files created by writemany
404 test_3b() {
405         init_src
406         init_changelog
407
408         local time=60
409         local threads=5
410         writemany -q -a $DIR/$tdir/$tfile $time $threads ||
411                 error "writemany failed"
412
413         local LRSYNC_LOG=$(generate_logname "lrsync_log")
414         # Replicate the changes to $TGT
415         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
416                 -D $LRSYNC_LOG
417
418         check_diff $DIR/$tdir $TGT/$tdir
419         check_diff $DIR/$tdir $TGT2/$tdir
420
421         fini_changelog
422         cleanup_src_tgt
423         return 0
424 }
425 run_test 3b "Replicate files created by writemany"
426
427 # Test 3c - Replicate files created by createmany/unlinkmany
428 test_3c() {
429         init_src
430         init_changelog
431
432         local numfiles=1000
433         createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed"
434         unlinkmany $DIR/$tdir/$tfile $numfiles || error "unlinkmany failed"
435
436         local LRSYNC_LOG=$(generate_logname "lrsync_log")
437         # Replicate the changes to $TGT
438         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG \
439                 -D $LRSYNC_LOG
440         check_diff $DIR/$tdir $TGT/$tdir
441         check_diff $DIR/$tdir $TGT2/$tdir
442
443         fini_changelog
444         cleanup_src_tgt
445         return 0
446 }
447 run_test 3c "Replicate files created by createmany/unlinkmany"
448
449 # Test 4 - Replicate files created by iozone
450 test_4() {
451         which iozone > /dev/null 2>&1
452         [ $? -ne 0 ] && skip "iozone not found"
453
454         init_src
455         init_changelog
456
457         END_RUN_FILE=${DIR}/$tdir/run LOAD_PID_FILE=${DIR}/$tdir/pid \
458                 MOUNT=${DIR}/$tdir run_iozone.sh &
459         sleep 30
460         child_pid=$(pgrep iozone)
461         stop_procs $child_pid
462
463         local LRSYNC_LOG=$(generate_logname "lrsync_log")
464         # Replicate the changes to $TGT
465         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG \
466                 -D $LRSYNC_LOG
467         check_diff $DIR/$tdir $TGT/$tdir
468         check_diff $DIR/$tdir $TGT2/$tdir
469
470         $KILL -SIGCONT $child_pid
471         sleep 60
472         $KILL -SIGKILL $(pgrep run_iozone.sh)
473         $KILL -SIGKILL $(pgrep iozone)
474
475         # After killing 'run_iozone.sh', process 'iozone' becomes the
476         # child of PID 1. Hence 'wait' does not wait for it. Killing
477         # iozone first, means more iozone processes are spawned off which
478         # is not desirable. So, after sending a sigkill, the test goes
479         # into a wait loop for iozone to cleanup and exit.
480         wait
481         while [ "$(pgrep "iozone")" != "" ];
482         do
483                 ps -ef | grep iozone | grep -v grep
484                 sleep 1;
485         done
486
487         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
488         check_diff $DIR/$tdir $TGT/$tdir
489         check_diff $DIR/$tdir $TGT2/$tdir
490
491         fini_changelog
492         cleanup_src_tgt
493         return 0
494 }
495 run_test 4 "Replicate files created by iozone"
496
497 # Test 5a - Stop / start lustre_rsync
498 test_5a() {
499         init_src
500         init_changelog
501
502         NUMTEST=2000
503         createmany -o $DIR/$tdir/$tfile $NUMTEST
504
505         # Replicate the changes to $TGT
506         local LRSYNC_LOG=$(generate_logname "lrsync_log")
507         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
508                 -D $LRSYNC_LOG &
509         local child_pid=$!
510         sleep 30
511         $KILL -SIGHUP $child_pid
512         wait
513         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
514
515         check_diff $DIR/$tdir $TGT/$tdir
516         check_diff $DIR/$tdir $TGT2/$tdir
517
518         fini_changelog
519         cleanup_src_tgt
520         return 0
521 }
522 run_test 5a "Stop / start lustre_rsync"
523
524 # Test 5b - Kill / restart lustre_rsync
525 test_5b() {
526         init_src
527         init_changelog
528
529         NUMTEST=2000
530         createmany -o $DIR/$tdir/$tfile $NUMTEST
531
532         # Replicate the changes to $TGT
533         local LRSYNC_LOG=$(generate_logname "lrsync_log")
534         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
535                 -D $LRSYNC_LOG &
536         local child_pid=$!
537         sleep 30
538         $KILL -SIGKILL $child_pid
539         wait
540         $LRSYNC -l $LREPL_LOG -D $LRSYNC_LOG
541
542         check_diff $DIR/$tdir $TGT/$tdir
543         check_diff $DIR/$tdir $TGT2/$tdir
544
545         fini_changelog
546         cleanup_src_tgt
547         return 0
548 }
549 run_test 5b "Kill / restart lustre_rsync"
550
551 # Test 6 - lustre_rsync large no of hard links
552 test_6() {
553         init_src
554         init_changelog
555
556         local num_links=128
557         local i
558
559         touch $DIR/$tdir/link0
560         for ((i = 1; i < num_links - 1; i++)); do
561                 ln $DIR/$tdir/link0 $DIR/$tdir/link$i
562         done
563         # create an extra hard link of src name ending with dest name
564         ln $DIR/$tdir/link0 $DIR/$tdir/ink0
565
566         local LRSYNC_LOG=$(generate_logname "lrsync_log")
567         # Replicate the changes to $TGT
568         $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG \
569                 -D $LRSYNC_LOG
570         check_diff $DIR/$tdir $TGT/$tdir
571         check_diff $DIR/$tdir $TGT2/$tdir
572
573         local count1=$(stat --format=%h $TGT/$tdir/link0)
574         local count2=$(stat --format=%h $TGT2/$tdir/link0)
575         if ((count1 != num_links || count2 != num_links)); then
576                 ls -l $TGT/$tdir/link0 $TGT2/$tdir/link0
577                 error "Incorrect no of hard links found $count1, $count2"
578         fi
579
580         fini_changelog
581         cleanup_src_tgt
582         return 0
583 }
584 run_test 6 "lustre_rsync large no of hard links"
585
586 # Test 7 - lustre_rsync stripesize
587 test_7() {
588         local numfiles=100
589
590         init_src
591         mkdir -p ${DIR}/tgt/$tdir
592         init_changelog
593
594         $LFS setstripe -c $OSTCOUNT $DIR/$tdir ||
595                 error "$LFS setstripe failed"
596         createmany -o $DIR/$tdir/$tfile $numfiles
597
598         # To simulate replication to another lustre filesystem, replicate
599         # the changes to $DIR/tgt. We can't turn off the changelogs
600         # while we are registered, so lustre_rsync better not try to
601         # replicate the replication steps.  It seems ok :)
602
603         local LRSYNC_LOG=$(generate_logname "lrsync_log")
604         $LRSYNC -s $DIR -t $DIR/tgt -m $MDT0 -u $CL_USER -l $LREPL_LOG \
605                 -D $LRSYNC_LOG
606         check_diff ${DIR}/$tdir $DIR/tgt/$tdir
607
608         local i=0
609         while [ $i -lt $numfiles ];
610         do
611                 local count=$($LFS getstripe $DIR/tgt/$tdir/${tfile}$i |
612                               awk '/stripe_count/ {print $2}')
613                 if [ $count -ne $OSTCOUNT ]; then
614                         error "Stripe size not replicated"
615                 fi
616                 i=$(expr $i + 1)
617         done
618         fini_changelog
619         cleanup_src_tgt
620         return 0
621 }
622 run_test 7 "lustre_rsync stripesize"
623
624 # Test 8 - Replicate multiple file/directory moves
625 test_8() {
626         init_src
627         init_changelog
628
629         for i in 1 2 3 4 5 6 7 8 9; do
630                 mkdir $DIR/$tdir/d$i
631                 for j in 1 2 3 4 5 6 7 8 9; do
632                         mkdir $DIR/$tdir/d$i/d$i$j
633                         createmany -o $DIR/$tdir/d$i/d$i$j/a 10 \
634                             > /dev/null
635                         mv $DIR/$tdir/d$i/d$i$j $DIR/$tdir/d$i/d0$i$j
636                         createmany -o $DIR/$tdir/d$i/d0$i$j/b 10 \
637                             > /dev/null
638                         mv $DIR/$tdir/d$i/d0$i$j/a0 $DIR/$tdir/d$i/d0$i$j/c0
639                 done
640                 mv $DIR/$tdir/d$i $DIR/$tdir/d0$i
641         done
642
643         local LRSYNC_LOG=$(generate_logname "lrsync_log")
644         $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG \
645                 -D $LRSYNC_LOG
646
647         check_diff ${DIR}/$tdir $TGT/$tdir
648
649         fini_changelog
650         cleanup_src_tgt
651         return 0
652 }
653 run_test 8 "Replicate multiple file/directory moves"
654
655 test_9() {
656         init_src
657         init_changelog
658
659         mkdir $DIR/$tdir/foo
660         touch $DIR/$tdir/foo/a1
661
662         local LRSYNC_LOG=$(generate_logname "lrsync_log")
663         $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG \
664                 -D $LRSYNC_LOG
665
666         check_diff ${DIR}/$tdir $TGT/$tdir
667
668         rm -rf $DIR/$tdir/foo
669
670         $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG \
671                 -D $LRSYNC_LOG
672
673         check_diff ${DIR}/$tdir $TGT/$tdir
674
675         fini_changelog
676         cleanup_src_tgt
677         return 0
678 }
679 run_test 9 "Replicate recursive directory removal"
680
681 cd $ORIG_PWD
682 complete_test $SECONDS
683 check_and_cleanup_lustre
684 exit_status