Whamcloud - gitweb
merge b_devel into HEAD, which will become 0.7.3
[fs/lustre-release.git] / lustre / tests / runfailure-client-mds-recover.sh
1 #!/bin/sh
2 SRCDIR=.
3
4 . common.sh
5
6 reconnect () { 
7
8 $OBDCTL <<EOF
9 name2dev RPCDEV
10 newconn
11 quit
12 EOF
13
14 }
15
16
17
18 echo 
19 echo "Test 1 drop request:" `date` "creating /mnt/lustre/foo"
20 echo
21 rm -rf /mnt/lustre/*
22 echo 0x80000107 > /proc/sys/lustre/fail_loc
23 touch /mnt/lustre/foo &
24 ps axww | grep touch
25 echo "MDS dropped create request -- sleep 4 secs - watch for timeout"
26 sleep 7
27 # reconnect
28 sleep 1
29 echo "did things recover? check for file foo."
30 ls -l /mnt/lustre
31 echo "Test 1 done"
32
33
34 echo
35 echo "Test 2 test delay queue:" `date` "creating /mnt/lustre/foo"
36 echo
37 rm -rf /mnt/lustre/*
38 mkdir /mnt/lustre/a
39 echo 0x80000107 > /proc/sys/lustre/fail_loc
40 touch /mnt/lustre/foo &
41 ps axww | grep touch
42 echo "MDS dropped create request -- sleep 4 secs - watch for timeout"
43 sleep 4
44 touch /mnt/lustre/a/f &
45 #reconnect
46 sleep 5
47 echo "did things recover? check for file foo and a/f"
48 ls -l /mnt/lustre
49 ls -l /mnt/lustre/a
50 echo "Test 2 done"
51
52 echo
53 echo "Test 3 dropped reply:" `date` "creating /mnt/lustre/foo2"
54 echo
55 rm -rf /mnt/lustre/*
56 echo 0x80000119 > /proc/sys/lustre/fail_loc
57 touch /mnt/lustre/foo2 &
58 ps axww | grep touch
59 echo "MDS dropped create request -- sleep 4 secs - watch for timeout"
60 sleep 4
61 # reconnect
62 echo failure cleared
63 sleep 4
64 echo "did things recover? check for file foo2"
65 ls -l /mnt/lustre
66 echo "Test 3 done"
67
68
69 echo
70 echo "Test 4: Multiple failures"
71 echo
72 echo 0x0000107 > /proc/sys/lustre/fail_loc
73 touch /mnt/lustre/bar &
74 ps axww | grep touch
75 echo "touch program will have repeated failures sleeping 10"
76 sleep 10
77 echo 0 > /proc/sys/lustre/fail_loc
78 # reconnect
79 sleep 6
80 echo "failure cleared"
81 echo "did things recover? Check for file bar"
82 ls -l /mnt/lustre/bar
83
84 echo "Test 4 done"
85
86
87 echo 
88 echo "Test 5: Continue writing during recovery:" `date` "creating and writing/mnt/lustre/foo"
89 echo
90 rm -rf /mnt/lustre/*
91 ./openme /mnt/lustre/foo3 & 
92 ./writeme /mnt/lustre/iogoeson & 
93 sleep 1
94 ls -l /mnt/lustre
95 echo 0x80000107 > /proc/sys/lustre/fail_loc
96 mknod /mnt/lustre/dev c 10 240 &
97 echo "MDS dropped create request -- sleep 4 secs - watch for timeout"
98 sleep 6
99 # reconnect
100 sleep 1
101 echo "did things recover? check for file foo, bar, check log for reopen."
102 ls -l /mnt/lustre
103 echo "Test 5 done"