From: Elena Gryaznova Date: Wed, 10 Oct 2018 16:10:34 +0000 (+0300) Subject: LU-11497 tests: improve ha.sh to set striped dirs X-Git-Tag: 2.12.0-RC1~27 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=13c4b38008cd9690e672706cff8d52873b7582f9 LU-11497 tests: improve ha.sh to set striped dirs For DNE II testing we need the possibility to create the striped directories, like it is done in t-f:test_mkdir(). This patch covers the following settings: -c stripe_count -i mdt_index -c stripe_count -i , which allows to have the clients work directories with the same stripe_count but different mdt indexes. Test-Parameters:trivial Signed-off-by: Elena Gryaznova Cray-bug-id: LUS-5974 Reviewed-by: Vladimir Saveliev Reviewed-by: Alexander Boyko Change-Id: I6117601e741a95059750149d1c38b402fccb29b7 Reviewed-on: https://review.whamcloud.com/33340 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/ha.sh b/lustre/tests/ha.sh index 6f7cb19..713811b 100755 --- a/lustre/tests/ha.sh +++ b/lustre/tests/ha.sh @@ -180,6 +180,9 @@ declare ha_power_delay=${POWER_DELAY:-60} declare ha_failback_delay=${DELAY:-5} declare ha_failback_cmd=${FAILBACK:-""} declare ha_stripe_params=${STRIPEPARAMS:-"-c 0"} +declare ha_dir_stripe_count=${DSTRIPECOUNT:-"1"} +declare ha_mdt_index=${MDTINDEX:-"0"} +declare ha_mdt_index_random=${MDTINDEXRAND:-false} declare -a ha_clients declare -a ha_servers declare -a ha_victims @@ -394,7 +397,14 @@ ha_repeat_mpi_load() local machines="-machinefile $ha_machine_file" while [ ! -e "$ha_stop_file" ] && ((rc == 0)); do { - ha_on $client mkdir -p "$dir" && + local mdt_index + if $ha_mdt_index_random && [ $ha_mdt_index -ne 0 ]; then + mdt_index=$(ha_rand $ha_mdt_index) + else + mdt_index=$ha_mdt_index + fi + ha_on $client $LFS mkdir -i$mdt_index -c$ha_dir_stripe_count "$dir" && + ha_on $client $LFS getdirstripe "$dir" && ha_on $client chmod a+xwr $dir && ha_on $client "su mpiuser sh -c \" $mpirun $ha_mpirun_options \ -np $((${#ha_clients[@]} * mpi_threads_per_client )) \