-
Notifications
You must be signed in to change notification settings - Fork 48
InstallDrbdAndPacemakerOnCentos6.3
caffeine edited this page Oct 23, 2013
·
1 revision
First we need to instal ELREPO extra package repository from where DRBD can be installed, as the package DRBD does not come in the default yum repositories.
On fizian-poc-01 and fizian-poc-02:
$ rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm
On fizian-poc-01 and fizian-poc-02:
$ yum install drbd84-utils kmod-drbd84
CentOS 6.3 comes with a firewall installed by default.
On fizian-poc-01 and fizian-poc-02:
$ /etc/init.d/iptables stop
$ chkconfig iptables off
resource rozofsexport {
meta-disk internal;
device /dev/drbd1;
disk /dev/sda3;
syncer {
verify-alg sha1;
}
on fizian-poc-01 {
address 192.168.5.1:7789;
}
on fizian-poc-02 {
address 192.168.5.2:7789;
}
net {
# Automatic split brain recovery policies
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri call-pri-lost-after-sb;
}
}
$ drbdadm create-md rozofsexport
$ service drbd start
$ drbdadm primary --force rozofsexport
$ service drbd status
$ mkfs.ext4 /dev/sda3
$ chkconfig drbd off
$ yum install pacemaker cman ccs resource-agents
$ ccs -f /etc/cluster/cluster.conf --createcluster pacemaker1
$ ccs -f /etc/cluster/cluster.conf --addnode node1
$ ccs -f /etc/cluster/cluster.conf --addnode node2
$ ccs -f /etc/cluster/cluster.conf --addfencedev pcmk agent=fence_pcmk
$ ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect node1
$ ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect node2
$ ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk node1 pcmk-redirect port=node1
$ ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk node2 pcmk-redirect port=node2