From: Yu Jian Date: Thu, 11 Aug 2011 10:34:27 +0000 (+0800) Subject: LU-544 speed up filesystem formatting time in conf-sanity.sh X-Git-Tag: 2.1.0-RC0~11 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3d3e2a1674b943821236c430f9494c42b2c60de6 LU-544 speed up filesystem formatting time in conf-sanity.sh Pass "-E lazy_itable_init" to mke2fs to speed up Lustre filesystem formatting time in conf-sanity.sh. Signed-off-by: Yu Jian Change-Id: I29070e6c4b95028b12573d552a32ca04189c2c1d Reviewed-on: http://review.whamcloud.com/1210 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: Hudson Tested-by: Maloo --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index f55c2f4..a2069e5 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -49,6 +49,16 @@ if [ -n "$MDSSIZE" ]; then STORED_MDSSIZE=$MDSSIZE fi +# pass "-E lazy_itable_init" to mke2fs to speed up the formatting time +for facet in MGS MDS OST; do + opts=${facet}_MKFS_OPTS + if [[ ${!opts} != *lazy_itable_init* ]]; then + eval SAVED_${facet}_MKFS_OPTS=\"${!opts}\" + eval ${facet}_MKFS_OPTS=\"${!opts} \ +--mkfsoptions='\\\"-E lazy_itable_init\\\"'\" + fi +done + init_logging # @@ -2760,5 +2770,13 @@ fi cleanup_gss +# restore the ${facet}_MKFS_OPTS variables +for facet in MGS MDS OST; do + opts=SAVED_${facet}_MKFS_OPTS + if [[ -n ${!opts} ]]; then + eval ${facet}_MKFS_OPTS=\"${!opts}\" + fi +done + complete $(basename $0) $SECONDS exit_status