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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
|
resource example {
options {
on-no-data-accessible suspend-io;
}
net {
cram-hmac-alg "sha1";
shared-secret "secret_string";
}
# The disk section is possible on resource level and in each
# volume section
disk {
# If you have a resonable RAID controller
# with non volatile write cache (BBWC, flash)
disk-flushes no;
disk-barrier no;
md-flushes no;
}
# volume sections on resource level, are inherited to all node
# sections. Place it here if the backing devices have the same
# device names on all your nodes.
volume 1 {
device minor 1;
disk /dev/sdb1;
meta-disk internal;
disk {
resync-after example/0;
}
}
on wurzel {
address 192.168.47.1:7780;
volume 0 {
device minor 0;
disk /dev/vg_wurzel/lg_example;
meta-disk /dev/vg_wurzel/lv_example_md;
}
}
on sepp {
address 192.168.47.2:7780;
volume 0 {
device minor 0;
disk /dev/vg_sepp/lg_example;
meta-disk /dev/vg_sepp/lv_example_md;
}
}
}
resource "ipv6_example_res" {
net {
cram-hmac-alg "sha1";
shared-secret "ieho4CiiUmaes6Ai";
}
volume 2 {
device "/dev/drbd_fancy_name" minor 0;
disk /dev/vg0/example2;
meta-disk internal;
}
on amd {
# Here is an example of ipv6.
# If you want to use ipv4 in ipv6 i.e. something like [::ffff:192.168.22.11]
# you have to set disable-ip-verification in the global section.
address ipv6 [fd0c:39f4:f135:305:230:48ff:fe63:5c9a]:7789;
}
on alf {
address ipv6 [fd0c:39f4:f135:305:230:48ff:fe63:5ebe]:7789;
}
}
#
# A two volume setup with a node for disaster recovery in an off-site location.
#
resource alpha-bravo {
net {
cram-hmac-alg "sha1";
shared-secret "Gei6mahcui4Ai0Oh";
}
on alpha {
volume 0 {
device minor 0;
disk /dev/foo;
meta-disk /dev/bar;
}
volume 1 {
device minor 1;
disk /dev/foo1;
meta-disk /dev/bar1;
}
address 192.168.23.21:7780;
}
on bravo {
volume 0 {
device minor 0;
disk /dev/foo;
meta-disk /dev/bar;
}
volume 1 {
device minor 1;
disk /dev/foo1;
meta-disk /dev/bar1;
}
address 192.168.23.22:7780;
}
}
resource stacked_multi_volume {
net {
protocol A;
on-congestion pull-ahead;
congestion-fill 400M;
congestion-extents 1000;
}
disk {
c-fill-target 10M;
}
volume 0 { device minor 10; }
volume 1 { device minor 11; }
proxy {
memlimit 500M;
plugin {
lzma contexts 4 level 9;
}
}
stacked-on-top-of alpha-bravo {
address 192.168.23.23:7780;
proxy on charly {
# In the regular production site, there is a dedicated host to run
# DRBD-proxy
inside 192.168.23.24:7780; # for connections to DRBD
outside 172.16.17.18:7780; # for connections over the WAN or VPN
options {
memlimit 1G; # Additional proxy options are possible here
}
}
}
on delta {
volume 0 {
device minor 0;
disk /dev/foo;
meta-disk /dev/bar;
}
volume 1 {
device minor 1;
disk /dev/foo1;
meta-disk /dev/bar1;
}
address 127.0.0.2:7780;
proxy on delta {
# In the DR-site the proxy runs on the machine that stores the data
inside 127.0.0.1:7780;
outside 172.16.17.19:7780;
}
}
}
resource drbd_9_two_connection {
volume 0 {
device minor 19;
disk /dev/foo/bar;
meta-disk internal;
}
on alpha {
node-id 0;
address 192.168.31.1:7800;
}
on bravo {
node-id 1;
address 192.168.31.2:7800;
}
on charlie {
node-id 2;
address 192.168.31.3:7800;
}
net {
ko-count 3;
}
connection "optional name" {
host alpha;
host bravo;
net { protocol C; }
}
connection {
host alpha address 127.0.0.1:7800 via proxy on alpha {
inside 127.0.0.2:7800;
outside 192.168.31.1:7801;
}
host charlie address 127.0.0.1:7800 via proxy on charlie {
inside 127.0.0.2:7800;
outside 192.168.31.3:7800;
}
net { protocol A; }
volume 0 {
disk {
resync-rate 10M;
c-plan-ahead 20;
c-delay-target 10;
c-fill-target 100;
c-min-rate 10;
c-max-rate 100M;
}
}
}
connection {
host bravo address 127.0.0.1:7800 via proxy on bravo {
inside 127.0.0.2:7800;
outside 192.168.31.2:7801;
}
host charlie address 127.0.0.1:7800 via proxy on charlie {
inside 127.0.0.2:7800;
outside 192.168.31.3:7800;
}
net { protocol A; }
}
}
resource drbd_9_mesh {
volume 0 {
device minor 21;
disk /dev/foo/bar2;
meta-disk internal;
}
on alpha {
node-id 0;
address 192.168.31.1:7900;
}
on bravo {
node-id 1;
address 192.168.31.2:7900;
}
on charlie {
node-id 2;
address 192.168.31.3:7900;
}
connection-mesh {
hosts alpha bravo charlie;
net {
protocol C;
}
}
}
resource drbd_9_multi_path {
volume 0 {
device minor 12;
disk /dev/foo/bar3;
meta-disk internal;
}
on alpha {
node-id 0;
}
on bravo {
node-id 1;
}
connection {
path {
host alpha address 192.168.41.1:7900;
host bravo address 192.168.41.2:7900;
}
path {
host alpha address 192.168.42.1:7900;
host bravo address 192.168.42.2:7900;
}
net {
transport rdma;
sndbuf-size 10M;
rcvbuf-size 10M;
max-buffers 20000;
protocol C;
}
}
}
resource dless {
volume 0 {
device minor 99;
disk /dev/foo/bar4;
meta-disk internal;
}
on fat-tyre {
node-id 0;
}
on other {
node-id 1;
volume 0 {
disk none;
}
}
connection {
host fat-tyre address 10.43.9.50:7000;
host other address 10.43.9.51:7000;
}
}
|