start_osts 1
# read file again with ost2 failed
- $LCTL set_param ldlm.namespaces.lustre-*-osc-[-0-9a-f]*.lru_size=clear
-
- fail ost2 &
- sleep 1
+ stop_osts 2
+ drop_client_cache
# check size, glimpse should work
$CHECKSTAT -t file -s $fsize $DIR/$tfile ||
[[ "$rs" == "ost1" ]] ||
error "file content error: expected: \"ost1\", actual: \"$rs\""
- wait_osc_import_ready client ost2
+ start_osts 2
}
run_test 33 "read can choose available mirror to read"
local osts=$(comma_list $(osts_nodes))
- # define OBD_FAIL_OST_SKIP_LV_CHECK 0x241
- do_nodes $osts lctl set_param fail_loc=0x241
-
- mirror_io copy -i ${mirror_array[0]} \
- -t $(echo ${mirror_array[@]:1} | tr ' ' ',') $tf ||
- error "mirror copy error"
-
- do_nodes $osts lctl set_param fail_loc=0
+ $LFS mirror copy -i ${mirror_array[0]} -o-1 $tf ||
+ error "mirror copy error"
# verify copying is successful by checking checksums
remount_client $MOUNT
for i in ${mirror_array[@]}; do
sum=$($LFS mirror read -N $i $tf | md5sum)
[ "$sum" = "${checksums[1]}" ] ||
- error "$i: mismatch checksum after copy"
+ error "$i: mismatch checksum after copy \'$sum\'"
done
rm -f $tf