test_suite: increase size of /mars to 25GB

This commit is contained in:
Frank Liepold 2014-03-11 13:51:28 +01:00 committed by Thomas Schoebel-Theuer
parent 6ff446dac1
commit 802d96cd8d
4 changed files with 29 additions and 15 deletions

View File

@ -46,7 +46,7 @@ lv_config_vg_recreatable_list=(\
## be recreated.
## the names are built due to the pattern lv-<i>-<size>
lv_config_lv_name_list=(lv-1-2 lv-2-2 lv-3-2 lv-4-2 lv-5-10 lv-6-100)
lv_config_lv_name_list=(lv-1-2 lv-2-2 lv-3-2 lv-4-2 lv-5-25 lv-6-100)
## host indexed list of partitions to be used for the logical volumes
declare -g -A lv_config_partition_list

View File

@ -849,9 +849,7 @@ function resource_test_emergency_on_all_resources
{
[ $# -eq 4 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local primary_host=$1 secondary_host=$2 mars_lv_name=$3 mars_dev_size_mb=$4
local res
local fill_size_mb time_waited
local marsadm_out host list_cmd res_list sort_opt=""
local res list_cmd res_list sort_opt=""
for res in ${resource_name_list[@]}; do
local p=${resource_emergency_percentage[$res]}
@ -876,7 +874,15 @@ function resource_test_emergency_on_all_resources
sort_opt="r"
eval res_list='($('$list_cmd'))'
for res in ${res_list[@]}; do
: # TODO
# TODO
local trunc_size_mb=$((($mars_dev_size_mb \
* ${resource_emergency_percentage[$res]}) / 100 ))
lib_vmsg " removing $primary_host:$resource_big_file"
lib_remote_idfile $primary_host "rm -f $resource_big_file" || lib_exit 1
lib_rw_stop_writing_data_device $primary_host $writer_script "write_count"
resource_correct_emergency $primary_host $secondary_host $res
done
}
@ -903,14 +909,8 @@ function resource_test_emergency_on_one_resource
lib_rw_stop_writing_data_device $primary_host $writer_script "write_count"
marsadm_do_cmd $secondary_host "invalidate" $res
resource_correct_emergency $primary_host $secondary_host $res
lib_wait_for_initial_end_of_sync $primary_host $secondary_host $res \
$resource_maxtime_initial_sync \
$resource_time_constant_initial_sync \
"time_waited"
resource_check_resource_running $primary_host $secondary_host $res
}
function resource_check_logfile_change
@ -949,6 +949,7 @@ function resource_put_resource_to_emergency_mode
[ $# -eq 4 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local host=$1 res=$2 mars_dev_size_mb=$3 emergency_percentage=$4
local fill_size_mb marsadm_out
fill_size_mb=$(( ($mars_dev_size_mb * $emergency_percentage) / 100 ))
lib_vmsg " creating $resource_big_file with $fill_size_mb MB to put $res in emerg. mode on $host"
@ -997,3 +998,16 @@ function resource_check_resource_running
$res $dev 0
}
function resource_correct_emergency
{
local primary_host=$1 secondary_host=$2 res=$3
marsadm_do_cmd $secondary_host "invalidate" $res
lib_wait_for_initial_end_of_sync $primary_host $secondary_host $res \
$resource_maxtime_initial_sync \
$resource_time_constant_initial_sync \
"time_waited"
resource_check_resource_running $primary_host $secondary_host $res
}

View File

@ -27,6 +27,6 @@ resource_fs_on_data_device_necessary=0
mars_dir_full_maxtime_state_constant=60
cluster_mars_dir_lv_name_list=([${global_host_list[0]}]=lv-5-10 [${global_host_list[1]}]=lv-6-100)
cluster_mars_dir_lv_name_list=([${global_host_list[0]}]=lv-5-25 [${global_host_list[1]}]=lv-6-100)
run_list="resource_prepare resource_run_first resource_fill_mars_dir lib_general_mars_checks_after_every_test"

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
# Copyright 2010-2014 Frank Liepold / 1&1 Internet AG
#
# Email: frank.liepold@1und1.de
#
@ -30,7 +30,7 @@ lib_rw_part_of_device_size_written_per_loop=$((10 * 1024 * 1024))
mars_dir_full_maxtime_state_constant=60
cluster_mars_dir_lv_name_list=([${global_host_list[0]}]=lv-5-10 [${global_host_list[1]}]=lv-6-100)
cluster_mars_dir_lv_name_list=([${global_host_list[0]}]=lv-5-25 [${global_host_list[1]}]=lv-6-100)
resource_name_list=(
lv-1-2