mirror of https://github.com/schoebel/mars
48 lines
1.8 KiB
Bash
48 lines
1.8 KiB
Bash
#!/bin/bash
|
|
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
|
|
#
|
|
# Email: frank.liepold@1und1.de
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#####################################################################
|
|
|
|
main_host_list=("istore-test-bs7" "istore-test-bap7")
|
|
main_set_globals_depending_on_main_host_list
|
|
|
|
multires_lv_size=2
|
|
multires_lv_size_mars_dir=100
|
|
|
|
# lvs lv-1-<size> ... lv-<multires_lv_count>-<size>
|
|
lv_config_lv_name_list=($(eval echo lv-{1..$(($multires_lv_count - 1))}-$multires_lv_size))
|
|
|
|
# special size for /mars device, which is always the last lv
|
|
lv_config_lv_name_list[$multires_lv_count]="lv-$multires_lv_count-$multires_lv_size_mars_dir"
|
|
|
|
# mapping lv name -> resource name
|
|
resource_name_list=($(eval echo '"${lv_config_lv_name_list["'{0..$(($multires_lv_count - 2))}'"]}"'))
|
|
|
|
resource_set_globals_depending_on_resource_name_list
|
|
|
|
marsadm_timeout=10
|
|
|
|
# lvs lv-8-<size> for all hosts
|
|
eval cluster_mars_dir_lv_name_list=($(x=(${main_host_list[@]/#/[}); y=(${x[@]/%/]=lv-$multires_lv_count-$multires_lv_size_mars_dir}); echo ${y[@]}))
|
|
|
|
|
|
resource_fs_on_data_device_necessary=0
|
|
|
|
run_list="lv_config_prepare lv_config_run resource_prepare resource_run_all"
|