From 335d4f1743b3245b08f33b41b0605f6b5a71eff6 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 16 Nov 2021 19:02:05 +0000 Subject: [PATCH] Config DRBD --- Serveurs/aunt.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++ Serveurs/mother.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/Serveurs/aunt.md b/Serveurs/aunt.md index f053e67..791d655 100644 --- a/Serveurs/aunt.md +++ b/Serveurs/aunt.md @@ -63,6 +63,69 @@ Adresse ipv6 publique : 2001:910:1360::3 bridge_waitport 0 # suppression du délai avant que le port soit disponible pour le bridge bridge_fd 0 # suppression de délai avant que le forwarding du bridge soit établi +### Configuration DRBD + +#### /etc/drbd.d/drbd1.res + + resource drbd1 { + meta-disk internal; + device /dev/drbd1; + + startup { + wfc-timeout 20; + become-primary-on both; + } + net { + verify-alg sha256; + allow-two-primaries yes; + max-buffers 10k; + max-epoch-size 10k; + unplug-watermark 32; + sndbuf-size 0; + rcvbuf-size 0; + } + disk { + on-io-error detach; + #no-disk-flushes; + #no-disk-barrier; + c-plan-ahead 10; + c-fill-target 150M; + c-min-rate 10k; + c-max-rate 500M; + } + + on mother { # hostname must match `uname -n` output + disk /dev/md1; # Logical Volume on the provided host + address 192.169.254.2:7789; # IP Address to be used to connect to the node with port + } + + on aunt { # hostname must match `uname -n` output + disk /dev/md1; # Logical Volume on the provided host + address 192.169.254.3:7789; # IP Address to be used to connect to the node with port + } + } + +#### /etc/ocfs2/cluster.conf + + cluster: + name = sharedfs + heartbeat_mode = local + node_count = 2 + + node: + cluster = sharedfs + number = 0 + ip_port = 7777 + ip_address = 192.169.254.3 + name = aunt + + node: + cluster = sharedfs + number = 1 + ip_port = 7777 + ip_address = 192.169.254.2 + name = mother + ### Configuration MTA #### /etc/postfix/transport diff --git a/Serveurs/mother.md b/Serveurs/mother.md index a0a858d..83ac351 100644 --- a/Serveurs/mother.md +++ b/Serveurs/mother.md @@ -63,6 +63,69 @@ Adresse ipv6 publique : 2001:910:1360::2 bridge_waitport 0 # suppression du délai avant que le port soit disponible pour le bridge bridge_fd 0 # suppression de délai avant que le forwarding du bridge soit établi +### Configuration DRBD + +#### /etc/drbd.d/drbd1.res + + resource drbd1 { + meta-disk internal; + device /dev/drbd1; + + startup { + wfc-timeout 20; + become-primary-on both; + } + net { + verify-alg sha256; + allow-two-primaries yes; + max-buffers 10k; + max-epoch-size 10k; + unplug-watermark 32; + sndbuf-size 0; + rcvbuf-size 0; + } + disk { + on-io-error detach; + #no-disk-flushes; + #no-disk-barrier; + c-plan-ahead 10; + c-fill-target 150M; + c-min-rate 10k; + c-max-rate 500M; + } + + on mother { # hostname must match `uname -n` output + disk /dev/md1; # Logical Volume on the provided host + address 192.169.254.2:7789; # IP Address to be used to connect to the node with port + } + + on aunt { # hostname must match `uname -n` output + disk /dev/md1; # Logical Volume on the provided host + address 192.169.254.3:7789; # IP Address to be used to connect to the node with port + } + } + +#### /etc/ocfs2/cluster.conf + + cluster: + name = sharedfs + heartbeat_mode = local + node_count = 2 + + node: + cluster = sharedfs + number = 0 + ip_port = 7777 + ip_address = 192.169.254.3 + name = aunt + + node: + cluster = sharedfs + number = 1 + ip_port = 7777 + ip_address = 192.169.254.2 + name = mother + ### Configuration MTA #### /etc/postfix/transport