This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmesg | grep drbd | |
drbd: initialized. Version: 8.3.8 (api:88/proto:86-94) | |
drbd: GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by [email protected], 2010-06-04 08:04:27 | |
drbd: registered as block device major 147 | |
drbd: minor_table @ 0xffff88001a213480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/drbd.conf | |
include /etc/drbd.d/globalCommon.conf; | |
include "drbd.d/*.res"; | |
# BOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "alias bond0 bonding | |
options bonding mode=4 miimon=100 max_bonds=1" > /etc/modprobe.d/bonding.conf | |
# modprobe -v bonding | |
insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/bonding/bonding.ko | |
# dmesg| tail -n 2 | |
[1724922.513994] Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008) | |
[1724922.514005] bonding: MII link monitoring set to 100 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install ifenslave | |
# /etc/network/interfaces | |
auto bond0 | |
iface bond0 inet static | |
address 10.254.254.253 | |
netmask 255.255.255.252 | |
network 10.254.254.252 | |
broadcast 10.254.254.255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -p /etc/default/corosync /etc/default/corosync.org | |
sed -i 's/START=no/START=yes/' /etc/default/corosync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
totem { | |
version: 2 | |
# How long before declaring a token lost (ms) | |
token: 3000 | |
# How many token retransmits before forming a new configuration | |
token_retransmits_before_loss_const: 10 | |
# How long to wait for join messages in the membership protocol (ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -p /etc/corosync/corosync.conf /etc/corosync/corosync.conf.org | |
curl https://raw.github.com/gist/4025403/89e155644eeef98161fb318b85ee30202cf6ec0a/corosync.conf >> /etc/corosync/corosync.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# netstat -plantu | grep corosync | |
udp 0 0 10.0.1.219:5410 0.0.0.0:* 3916/corosync | |
udp 0 0 10.0.1.219:5411 0.0.0.0:* 3916/corosync | |
udp 0 0 226.94.1.11:5411 0.0.0.0:* 3916/corosync | |
udp 0 0 10.254.254.254:5412 0.0.0.0:* 3916/corosync | |
udp 0 0 10.254.254.254:5413 0.0.0.0:* 3916/corosync | |
udp 0 0 226.94.1.13:5413 0.0.0.0:* 3916/corosync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# corosync-objctl | grep member | |
runtime.totem.pg.mrp.srp.members.1526792202.ip=r(0) ip(10.0.1.219) r(1) ip(10.254.254.254) | |
runtime.totem.pg.mrp.srp.members.1526792202.join_count=1 | |
runtime.totem.pg.mrp.srp.members.1526792202.status=joined | |
runtime.totem.pg.mrp.srp.members.1560346634.ip=r(0) ip(10.0.1.221) r(1) ip(10.254.254.253) | |
runtime.totem.pg.mrp.srp.members.1560346634.join_count=1 | |
runtime.totem.pg.mrp.srp.members.1560346634.status=joined | |
# corosync-cfgtool -a 1526792202 -a 1560346634 | |
10.0.1.219 10.254.254.254 | |
10.0.1.221 10.254.254.253 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - postgres | |
psql | |
ALTER USER postgres with password 'new-password'; | |
\q |