#!/bin/bash # Copyright 2013 Frank Liepold / 1&1 Internet AG # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. ##################################################################### ## defaults for module lv_config ## ## the name of the logical volume group which contains all logical volumes ## needed for the tests lv_config_lvg_name="vg-mars" ## minimal size of the logical volume group. The group must be able to contain ## /mars and all data devices. lv_config_min_lvg_size=200 # GB ## prefix for the logical volume names used. The full name is formed by ## appending (separated by -) a serial number (starting bei 1) and the volumes ## size in G (eg. lv-2-100 denotes the second lv with 100GB space on it). lv_config_lv_name_prefix="lv-" ## per host flag to indicate, whether the volume group may be recreated ## if set to 0 the volume group lv_config_lvg_name must exist otherwise an ## existing volume group of this name will be recreated. ## Attention: In the latter case all existing data will be lost. declare -g -A lv_config_vg_recreatable_list lv_config_vg_recreatable_list=(\ [istore-test-bs7]=1 \ [istore-test-bap7]=1 \ [istore-test-bs4]=1 \ [istore-test-bap4]=1 \ [istore-test-bs2]=1 \ [ovzd-test-bs1]=0 \ [ovzd-test-bap1]=0 \ ) ## The names and sizes of the logical volumes to be created within the volume ## group are derived from the array lv_config_lv_name_list ## Only logical volumes which do not exist or which have a wrong size will ## be recreated. ## the names are built due to the pattern lv-- lv_config_lv_name_list=(lv-1-2 lv-2-2 lv-3-2 lv-4-2 lv-5-10 lv-6-100) ## host indexed list of partitions to be used for the logical volumes declare -g -A lv_config_partition_list lv_config_partition_list=(\ [istore-test-bs7]="/dev/cciss/c1d0 /dev/cciss/c1d1 /dev/cciss/c1d2 /dev/cciss/c1d3" \ [istore-test-bap7]="/dev/cciss/c1d0 /dev/cciss/c1d1 /dev/cciss/c1d2 /dev/cciss/c1d3" \ [istore-test-bs4]="/dev/sdb" \ [istore-test-bap4]="/dev/sdb" \ [istore-test-bs2]="/dev/sdb" \ [ovzd-test-bs1]="/dev/sda2" \ [ovzd-test-bap1]="/dev/sda2" \ ) ## stripesize for -I option of lvcreate cmd. lv_config_stripesize=64K ## filesystem specific list of options for mkfs. call declare -g -A lv_config_mkfs_option_list lv_config_mkfs_option_list=([xfs]="-f" [ext3]="" [ext4]="") ## filesystem specific list of tune commands ## the string will be replaced during runtime by the actual device name declare -g -A lv_config_fs_type_tune_cmd_list lv_config_fs_type_tune_cmd_list=([xfs]="" [ext3]="tune2fs -c 0 " [ext4]="tune2fs -c 0 ") ## filesystem specific list of commmands to growing the fs. declare -g -A lv_config_fs_type_grow_cmd_list lv_config_fs_type_grow_cmd_list=([xfs]="xfs_growfs" [ext3]="resize2fs" [ext4]="resize2fs")