Patch adds the possibility to run mdtest on $mdtest_Nmntp
number of Lustre mount points.
Test-Parameters: trivial testlist=parallel-scale \
envdefinitions="mdtest_Nmntp=3" \
envdefinitions=ONLY=mdtestfpp envdefinitions=ONLY=mdtestssf
Cray-bug-id: LUS-7686
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I9bc68d4f296970290cf460bf25cc26537bcc3281
Reviewed-on: https://review.whamcloud.com/37665
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
local mdtest_custom_params=${mdtest_custom_params:-""}
local type=${1:-"ssf"}
local mdtest_custom_params=${mdtest_custom_params:-""}
local type=${1:-"ssf"}
+ local mdtest_Nmntp=${mdtest_Nmntp:-1}
+
+ if [ $type = "ssf" ] && [ $mdtest_Nmntp -ne 1 ]; then
+ skip "shared directory mode is not compatible" \
+ "with multiple directory paths"
+ fi
+
# FIXME
# Need space estimation here.
# FIXME
# Need space estimation here.
local testdir=$DIR/d0.mdtest
mkdir -p $testdir
setstripe_getstripe $testdir $mdtest_STRIPEPARAMS
local testdir=$DIR/d0.mdtest
mkdir -p $testdir
setstripe_getstripe $testdir $mdtest_STRIPEPARAMS
+ for ((i=1; i<mdtest_Nmntp; i++)); do
+ zconf_mount_clients $clients $MOUNT$i "$mntopts" ||
+ error_exit "Failed $clients on $MOUNT$i"
+ local dir=$DIR$i/d0.mdtest$i
+ mkdir -p $dir
+ setstripe_getstripe $dir $mdtest_SETSTRIPEPARAMS
+ chmod 0777 $dir
+ testdir="$testdir@$dir"
+ done
# -i # : repeat each test # times
# -d : test dir
# -i # : repeat each test # times
# -d : test dir
if [ $rc != 0 ] ; then
error "mdtest failed! $rc"
fi
if [ $rc != 0 ] ; then
error "mdtest failed! $rc"
fi
+ rm -rf $testdir
+ for ((i=1; i<mdtest_Nmntp; i++)); do
+ local dir=$DIR$i/d0.mdtest$i
+ rm -rf $dir
+ zconf_umount_clients $clients $MOUNT$i ||
+ error_exit "Failed umount $MOUNT$i on $clients"
+ done