From: Elena Gryaznova Date: Tue, 6 Apr 2021 07:13:41 +0000 (+0300) Subject: LU-14585 tests: use striped ha_test_dir X-Git-Tag: 2.14.52~139 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c58ce2c18590c8fe378c7902303e8d036d41bfe4;hp=28bac98fcb44aabb08258121fcfd39eb46cff0d7 LU-14585 tests: use striped ha_test_dir currently ha.sh has the ability to create the clients striped directories with different stripe parameters. We also need the ability to create working striped directory (ha_test_dir) to have the chance to replicate the issues hit on directory tree where child directory stripe settings differ from parent ones. Test-Parameters: trivial Signed-off-by: Elena Gryaznova HPE-bug-id: LUS-9621 Reviewed-by: Alexander Boyko Reviewed-by: Vladimir Saveliev Change-Id: I77612c360f0bf407bd0298f827b409b4a288540f Reviewed-on: https://review.whamcloud.com/43216 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Vladimir Saveliev Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/ha.sh b/lustre/tests/ha.sh index d18a26b..b7ada94 100755 --- a/lustre/tests/ha.sh +++ b/lustre/tests/ha.sh @@ -197,6 +197,9 @@ declare ha_pm_host=${PM_HOST:-$(hostname)} declare ha_failback_delay=${DELAY:-5} declare ha_failback_cmd=${FAILBACK:-""} declare ha_stripe_params=${STRIPEPARAMS:-"-c 0"} +declare ha_test_dir_stripe_count=${TDSTRIPECOUNT:-"1"} +declare ha_test_dir_mdt_index=${TDMDTINDEX:-"0"} +declare ha_test_dir_mdt_index_random=${TDMDTINDEXRAND:-false} declare ha_dir_stripe_count=${DSTRIPECOUNT:-"1"} declare ha_mdt_index=${MDTINDEX:-"0"} declare ha_mdt_index_random=${MDTINDEXRAND:-false} @@ -1092,7 +1095,17 @@ ha_main() "START: $0: $(date +%H:%M:%S' '%s)" trap ha_trap_exit EXIT mkdir "$ha_tmp_dir" - ha_on ${ha_clients[0]} mkdir "$ha_test_dir" + + local mdt_index + if $ha_test_dir_mdt_index_random && + [ $ha_test_dir_mdt_index -ne 0 ]; then + mdt_index=$(ha_rand $ha_test_dir_mdt_index) + else + mdt_index=$ha_test_dir_mdt_index + fi + ha_on ${ha_clients[0]} "$LFS mkdir -i$mdt_index \ + -c$ha_test_dir_stripe_count $ha_test_dir" + ha_on ${ha_clients[0]} $LFS getdirstripe $ha_test_dir ha_on ${ha_clients[0]} " \ $LFS setstripe $ha_stripe_params $ha_test_dir"