From 3d3e2a1674b943821236c430f9494c42b2c60de6 Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Thu, 11 Aug 2011 18:34:27 +0800 Subject: [PATCH] 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 --- lustre/tests/conf-sanity.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- 1.8.3.1