X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fscrub-performance.sh;h=0c029e7779511bcfbcb25e4c09ba0edec41be8ae;hb=784cd144103871bd421c139c09bfbf4d5d29ca08;hp=79f166df28d5a25cf320cf8c44e88d31fb634db6;hpb=d01d4c697a3c4423587159d58da6e455a5a3551f;p=fs%2Flustre-release.git diff --git a/lustre/tests/scrub-performance.sh b/lustre/tests/scrub-performance.sh index 79f166d..0c029e7 100644 --- a/lustre/tests/scrub-performance.sh +++ b/lustre/tests/scrub-performance.sh @@ -13,8 +13,10 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging -[ "${MDSFSTYPE:-$FSTYPE}" != "ldiskfs" ] && +[ $(facet_fstype $SINGLEMDS) != ldiskfs ] && skip "OI scrub performance only for ldiskfs" && exit 0 +[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] && + skip "Need MDS version at least 2.2.90" && exit 0 require_dsh_mds || exit 0 NTHREADS=${NTHREADS:-0} @@ -39,7 +41,7 @@ fi stopall do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local reformat_external_journal -add ${SINGLEMDS} $(mkfs_opts mds) --backfstype ldiskfs --reformat \ +add $SINGLEMDS $(mkfs_opts $SINGLEMDS) --backfstype ldiskfs --reformat \ $MDT_DEVNAME > /dev/null || exit 2 scrub_attach() { @@ -155,15 +157,16 @@ test_0() { error "Fail to start MDS!" while true; do - local STATUS=$($SHOW_SCRUB|sed -n '4'p|awk '{print $2}') + local STATUS=$($SHOW_SCRUB | + awk '/^status/ { print $2 }') [ "$STATUS" == "completed" ] && break sleep 3 # check status every 3 seconds done echo "--- end to rebuild OI for ${i} files set at: $(date) ---" - local RTIME=$($SHOW_SCRUB | sed -n '18'p | awk '{print $2}') + local RTIME=$($SHOW_SCRUB | awk '/^run_time/ { print $2 }') echo "rebuild OI for ${i} files used ${RTIME} seconds" - local SPEED=$($SHOW_SCRUB | sed -n '19'p | awk '{print $2}') + local SPEED=$($SHOW_SCRUB | awk '/^average_speed/ { print $2 }') echo "rebuild speed is ${SPEED}/sec" stop ${SINGLEMDS} > /dev/null || error "Fail to stop MDS!" done @@ -172,5 +175,5 @@ run_test 0 "OI scrub performance test" # cleanup the system at last scrub_cleanup -complete $(basename $0) $SECONDS +complete $SECONDS exit_status