5 LUSTRE=${LUSTRE:-`dirname $0`/..}
6 PATH=$PATH:$LUSTRE/utils:$LUSTRE/tests
8 . $LUSTRE/../ltest/functional/llite/common/common.sh
12 # XXX I wish all this stuff was in some default-config.sh somewhere
13 MDSNODE=${MDSNODE:-dev2}
14 OSTNODE=${OSTNODE:-dev3}
15 CLIENT=${CLIENTNODE:-dev4}
16 NETWORKTYPE=${NETWORKTYPE:-tcp}
17 MOUNTPT=${MOUNTPT:-/mnt/lustre}
18 CONFIG=recovery-small.xml
25 $PDSH $MDSNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
29 $PDSH $CLIENT "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
33 $PDSH $OSTNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
37 do_mds "echo 0x121 > /proc/sys/lustre/fail_loc"
39 do_mds "echo 0 > /proc/sys/lustre/fail_loc"
43 do_mds "echo 0x120 > /proc/sys/lustre/fail_loc"
45 do_mds "echo 0 > /proc/sys/lustre/fail_loc"
50 for NODE in $CLIENT $MDSNODE $OSTNODE; do
51 lmc -m $CONFIG --add net --node $NODE --nid `h2$NETWORKTYPE $NODE` \
52 --nettype $NETWORKTYPE || exit 4
54 lmc -m $CONFIG --add mds --node $MDSNODE --mds mds1 --dev $MDSDEV \
55 --size $MDSSIZE || exit 5
56 lmc -m $CONFIG --add ost --node $OSTNODE --ost ost1 --dev $OSTDEV \
57 --size $OSTSIZE || exit 6
58 lmc -m $CONFIG --add mtpt --node $CLIENT --path $MOUNTPT --mds mds1 \
63 do_mds "lconf $@ $CONFIG"
67 do_mds "lconf $@ --cleanup $CONFIG"
71 do_ost "lconf $@ $CONFIG"
75 do_ost "lconf $@ --cleanup $CONFIG"
79 do_client "lconf $@ $CONFIG"
83 do_client "lconf $@ --cleanup $CONFIG"
90 # XXX we should write our own upcall, when we move this somewhere better.
91 mount_client --timeout=10 \
92 --recovery_upcall=$PWD/../../ltest/functional/llite/09/client-upcall.sh
96 unmount_client || true
102 if [ $# -gt 1 ]; then
107 do_mds 'echo -e "device \$mds1\\nprobe\\nnotransno\\nreadonly" | lctl'
112 do_client "ls $MOUNPT" # trigger failover, if we haven't already
115 if [ ! -z "$ONLY" ]; then
121 drop_request "mcreate /mnt/lustre/1"
122 drop_reply "mcreate /mnt/lustre/2"
123 replay "mcreate /mnt/lustre/3"