From 935d49c9c19edb8a71d281bbbca2c8e801cb81af Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Tue, 3 Feb 2015 03:46:35 +0400 Subject: [PATCH] LU-6198 test: fix large-lun test_1, test_2 defects setupall()->start ost called at the end of large-lun.sh fails to start the ost devices which leads test_1() and test_2() fail if run separately. The reasons are: 1) osts data are destroyed by test_1()->llverdev 2) osts are reformatted by test_2, but mds config not changed Patch fixes the following: - format Lustre at the end of test_1() and test_2() - add the "REFORMAT" option check to avoid killing filesystems that do not want a reformat. Signed-off-by: Elena Gryaznova Xyratex-bug-id: MRP-1984 Reviewed-by: Vladimir Saveliev Change-Id: I7f1465d4777b7a5d5538e019226334dc090e3f50 Reviewed-on: http://review.whamcloud.com/13601 Reviewed-by: Emoly Liu Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin --- lustre/tests/large-lun.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/tests/large-lun.sh b/lustre/tests/large-lun.sh index bac2b01..2a60f90 100644 --- a/lustre/tests/large-lun.sh +++ b/lustre/tests/large-lun.sh @@ -11,6 +11,12 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging +if ! [ "$REFORMAT" ]; then + skip_env "$0 reformats all devices,\ + please set REFORMAT to run this test" + exit 0 +fi + # Variable to run mdsrate THREADS_PER_CLIENT=${THREADS_PER_CLIENT:-5} # thread(s) per client node MACHINEFILE=${MACHINEFILE:-$TMP/$TESTSUITE.machines} @@ -152,6 +158,8 @@ test_1 () { do_rpc_nodes $(facet_host ost${num}) run_llverdev $dev -vpf || error "llverdev on $dev failed!" done + # restore format overwritten by llverdev + formatall } run_test 1 "run llverdev on raw LUN" @@ -225,6 +233,9 @@ test_2 () { $RUN_FSCK && check_fsfacet ost${num} fi done + # there is no reason to continue using ost devices + # filled by llverfs as ldiskfs + formatall } run_test 2 "run llverfs on OST ldiskfs/zfs filesystem" -- 1.8.3.1