blob: 2dd6dc59d6123e8a21b89cdc495098ac49f06eca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Hey Emacs, this is a -*- shell-script -*- !!!
defconf TSMDISKSIZE "50G" \
"<n>G" "size of the TSM storage disk"
defconf TSMNAME "TSM01" \
"<name>" "name used by nodes to talk to TSM server"
defconf TSM_DB_SIZE 100 \
"<n>" "size of TSM database"
defconf TSM_SPACE_MGMT_SIZE 1024 \
"<n>" "size of TSM space management pool"
defconf TSM_BACKUP_POOL_SIZE 100 \
"<n>" "size of TSM backup pool"
defconf TSM_ARCHIVE_POOL_SIZE 100 \
"<n>" "size of TSM archive pool"
defconf TSM_TEMPLATE "$installdir/templates/tsmserver.xml" \
"<file>" "libvirt template for TSM server"
##############################
# TSM server node type
node_name_format_tsm ()
{
local cluster="$1"
local index="$2"
# If only 1 tsm_server node then don't number it.
if [ "${NODES/tsm_server:/}" = "${NODES//tsm_server:/}" ] ; then
printf '%stsm' "$cluster"
else
printf '%stsm%d' "$cluster" "$index"
fi
}
create_node_tsm_server ()
{
local ip_offset="$1"
local name="$2"
local ctdb_node="$3"
# This must be before defined create_node_COMMON because the
# template needs the value of TSMDISK.
TSMDISK="${VIRTBASE}/${CLUSTER}/${name}storage.qcow2"
echo "Creating node \"${name}\" (of type \"tsm_server\""
create_node_COMMON "$name" "$ip_offset" "$type" "$TSM_TEMPLATE"
local di="$TSMDISK"
if [ "$DISK_FOLLOW_SYMLINKS" = "yes" -a -L "$TSMDISK" ] ; then
di=$(readlink "$TSMDISK")
fi
echo "Creating TSM disk"
qemu-img create -f qcow2 "$di" $TSMDISKSIZE
echo
}
|