From 20031cfbd327039dffcd3c543d62a247f933646d Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Sun, 6 Nov 2016 22:12:57 +0800 Subject: [PATCH] LU-8701 tests: scrub-performance with separated MGS and MDS Support to run scrub-performance under the environment of MGS and MDS on separated devices. Test-Parameters: trivial envdefinitions=SLOW=yes combinedmdsmgs=false testlist=scrub-performance Test-Parameters: trivial envdefinitions=SLOW=yes testlist=scrub-performance Signed-off-by: Fan Yong Change-Id: I5b01097f3e73c2e0eca6071ecb597ac84893c77d Reviewed-on: https://review.whamcloud.com/23124 Reviewed-by: Jian Yu Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/scrub-performance.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lustre/tests/scrub-performance.sh b/lustre/tests/scrub-performance.sh index a43b860..4d9630b 100644 --- a/lustre/tests/scrub-performance.sh +++ b/lustre/tests/scrub-performance.sh @@ -13,13 +13,14 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging +[ "$SLOW" = "no" ] && + skip "skip scrub performance test under non-SLOW mode" && exit 0 + [ $(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 -[ "$SLOW" = "no" ] && skip "skip scrub performance test under non-SLOW mode" - NTHREADS=${NTHREADS:-0} UNIT=${UNIT:-1048576} @@ -41,10 +42,21 @@ if [ ${NTHREADS} -eq 0 ]; then fi stopall + +if ! combined_mgs_mds ; then + do_rpc_nodes $(facet_active_host mgs) load_modules_local + add mgs $(mkfs_opts mgs $(mgsdevname)) --backfstype ldiskfs \ + --reformat $(mgsdevname) $(mgsvdevname) ${quiet:+>/dev/null} || + exit 1 + + start mgs $(mgsdevname) $MGS_MOUNT_OPTS || error "Fail to start MGS!" +fi + do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local reformat_external_journal ${SINGLEMDS} add ${SINGLEMDS} $(mkfs_opts ${SINGLEMDS} ${MDT_DEVNAME}) --backfstype ldiskfs \ - --reformat ${MDT_DEVNAME} $(mdsvdevname 1) > /dev/null || exit 2 + --reformat ${MDT_DEVNAME} $(mdsvdevname 1) ${quiet:+>/dev/null} || + exit 2 scrub_attach() { ${ECHOCMD} "${LCTL} <<-EOF @@ -85,7 +97,11 @@ scrub_create() { } scrub_cleanup() { + stopall do_rpc_nodes $(facet_active_host $SINGLEMDS) unload_modules + if ! combined_mgs_mds ; then + do_rpc_nodes $(facet_active_host mgs) unload_modules + fi formatall } -- 1.8.3.1