#!/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=("ovzd-test-bs1" "ovzd-test-bap1") main_set_globals_depending_on_main_host_list multires_lv_size=2 multires_lv_size_mars_dir=100 # lvs lv-1- ... lv-- 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- 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[@]})) verbose_script=1 resource_fs_on_data_device_necessary=0 run_list="resource_prepare resource_run_all"