Whamcloud - gitweb
LU-8701 tests: scrub-performance with separated MGS and MDS 24/23124/4
authorFan Yong <fan.yong@intel.com>
Sun, 6 Nov 2016 14:12:57 +0000 (22:12 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Mar 2017 06:49:41 +0000 (06:49 +0000)
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 <fan.yong@intel.com>
Change-Id: I5b01097f3e73c2e0eca6071ecb597ac84893c77d
Reviewed-on: https://review.whamcloud.com/23124
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/scrub-performance.sh

index a43b860..4d9630b 100644 (file)
@@ -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
 }