From 2c8f023a450a3e4458457adad37cc2ab27f4174a Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Thu, 5 Jan 2012 11:02:12 +0800 Subject: [PATCH] reset raid level on each iteration --- cases-common.sh | 3 ++- main-loop.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cases-common.sh b/cases-common.sh index e3ee4e0..c242b8d 100644 --- a/cases-common.sh +++ b/cases-common.sh @@ -146,11 +146,12 @@ thresh() { output_dir="${storage_prefix}thresh=${dirty_thresh}${unit}${bg_name}" else output_dir="$array-${ndisk}${storage}-thresh=${dirty_thresh}${unit}${bg_name}" - RAID_LEVEL=${array,,*} fi make_dir $output_dir $(dd_job) || return + (( $ndisk > 1 )) && RAID_LEVEL=${array,,*} + [[ $unit = M || $unit = m ]] && bits=20 [[ $unit = G || $unit = g ]] && bits=30 diff --git a/main-loop.sh b/main-loop.sh index e42a411..85a1a14 100755 --- a/main-loop.sh +++ b/main-loop.sh @@ -32,6 +32,7 @@ do storage=${STORAGE:-HDD} devices=$DEVICES [[ $fs =~ nfs ]] && devices=$NFS_DEVICE + RAID_LEVEL=jbod cd $BASE_DIR