| 1 |
|
| 2 |
#!/bin/bash |
| 3 |
# Copyright 2010-2012 Thomas Schoebel-Theuer / 1&1 Internet AG |
| 4 |
# |
| 5 |
# Copying and distribution of this file, with or without modification, |
| 6 |
# are permitted in any medium without royalty provided the copyright |
| 7 |
# notice and this notice are preserved. This file is offered as-is, |
| 8 |
# without any warranty. |
| 9 |
|
| 10 |
##################################################################### |
| 11 |
|
| 12 |
## defaults for module recreate_lvm |
| 13 |
## |
| 14 |
## recreate_lvm: transparently (re)create LVM devices from a |
| 15 |
## set of physical volumes. |
| 16 |
## |
| 17 |
|
| 18 |
## enable_recreate_lvm |
| 19 |
## |
| 20 |
## Set to 0 or 1. Enable / disable this module. |
| 21 |
|
| 22 |
enable_recreate_lvm=0 |
| 23 |
|
| 24 |
## vg_name |
| 25 |
## |
| 26 |
## Name of the LVM volume group. |
| 27 |
## |
| 28 |
## All physical devices supplied in $replay_device_list will be |
| 29 |
## used to create a single volume group out of them, on each host |
| 30 |
## from $replay_host_list. Only the full cartesian product between |
| 31 |
## $replay_host_list and $replay_device_list is supported. |
| 32 |
## |
| 33 |
## WARNING! any pre-existing logical volumes (LVs) in that |
| 34 |
## volume group (VG) will be destroyed, and their data will be lost! |
| 35 |
## Their old physical volumes (PVs) are also removed and destroyed! |
| 36 |
## |
| 37 |
## After creation of the LVs, $replay_device_list will be re-written |
| 38 |
## to reflect the list of LVs thereafter. |
| 39 |
## |
| 40 |
## This means: you just supply the physical devices, the number of LVs |
| 41 |
## to create, and the size of each. |
| 42 |
## The names of the LVs are then created and maintained automatically for you. |
| 43 |
## This can be even combined with the iSCSI modules etc, which will |
| 44 |
## automatically take the LVs and work on them, instead of on the PVs. |
| 45 |
|
| 46 |
vg_name="vg-test" |
| 47 |
|
| 48 |
## lv_count |
| 49 |
## |
| 50 |
## Number of LVs to create. |
| 51 |
## |
| 52 |
## This determines the replay parallelism, when not limited |
| 53 |
## by $replay_max_parallelism. |
| 54 |
|
| 55 |
lv_count=1 |
| 56 |
|
| 57 |
## lv_size |
| 58 |
## |
| 59 |
## Size of each logical volume. Syntax see "man lvcreate". |
| 60 |
## |
| 61 |
## Of course, there must be enough space on the physical volumes :) |
| 62 |
|
| 63 |
lv_size=1T |
| 64 |
|
| 65 |
## lvm_striping |
| 66 |
## |
| 67 |
## Set to 0 or 1. Enable / disable LVM striping over multiple |
| 68 |
## physical volumes. |
| 69 |
## |
| 70 |
## When you have multiple RAID sets, this can _tremendously_ improve |
| 71 |
## IO performance! |
| 72 |
|
| 73 |
lvm_striping=1 |
| 74 |
|
| 75 |
## lvm_stripesize |
| 76 |
## |
| 77 |
## For best performace, this should be equal to the RAID stripesize |
| 78 |
## at physical level. |
| 79 |
|
| 80 |
lvm_stripesize=64 |