14 new_fs ext2 /tmp/ost 10000
17 new_fs ${MDSFS} /tmp/mds 10000
20 echo 0xffffffff > /proc/sys/portals/debug
27 attach obdfilter OBDDEV
44 MNT='mount -t lustre_lite -o device=`$OBDCTL name2dev OSCDEV` none /mnt/lustre'
48 echo $1 > /proc/sys/lustre/fail_loc
53 echo "Cleaning up and restarting MDS"
54 umount /mnt/lustre || fail "unable to unmount"
62 echo 0 > /proc/sys/lustre/fail_loc
76 chmod a+x /mnt/lustre/foo
79 # OBD_FAIL_MDS_REINT_SETATTR_WRITE - MDS will discard data from setattr
80 test_fail 0x10a chmod 000 /mnt/lustre/foo
82 [ ! -x /mnt/lustre/foo ] && fail "/mnt/lustre/foo is not executable!"
84 # OBD_FAIL_MDS_REINT_CREATE_WRITE - MDS will not create the file
85 test_fail 0x10c touch /mnt/lustre/bar
87 [ $? -eq 0 ] && fail "/mnt/lustre/bar was created!"
89 # OBD_FAIL_MDS_REINT_UNLINK_WRITE - MDS will discard data from unlink
90 test_fail 0x10e rm /mnt/lustre/foo
92 [ $? -eq 1 ] && fail "/mnt/lustre/foo has been removed!"
94 # OBD_FAIL_MDS_REINT_RENAME_WRITE - MDS will discard data from rename
95 test_fail 0x112 mv /mnt/lustre/foo /mnt/lustre/bar
96 ls /mnt/lustre/foo /mnt/lustre/bar
97 [ ! -f /mnt/lustre/foo -o -f /mnt/lustre/bar ] && \
98 fail "/mnt/lustre/foo has been renamed to bar!"