PACEMAKER: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 104: | Zeile 104: | ||
Online: [ fix foxy ] | Online: [ fix foxy ] | ||
− | ==[ | + | ==[[OCSF2]]== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=Links= | =Links= |
Version vom 8. September 2012, 15:47 Uhr
Installation
[ALL] Initial setup
Install required packages:
sudo apt-get install pacemaker cman resource-agents fence-agents gfs2-utils gfs2-cluster ocfs2-tools-cman openais drbd8-utils Make sure each host can resolve all other hosts. Best way to achive this is by adding their IPs and hostnames to /etc/hosts on all nodes. In this example, that would be:
eth0 192.168.244.161 fix 192.168.244.162 foxy eth1 10.168.244.161 fix-ha 10.168.244.162 foxy-ha
Disable o2cb from starting:
update-rc.d -f o2cb remove
[ALL] Create /etc/cluster/cluster.conf
Paste this into /etc/cluster/cluster.conf: <?xml version="1.0"?> <cluster config_version="4" name="pacemaker"> <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/> <clusternodes> <clusternode name="server1" nodeid="1" votes="1"> <fence> <method name="pcmk-redirect"> <device name="pcmk" port="server1"/> </method> </fence> </clusternode> <clusternode name="server2" nodeid="2" votes="1"> <fence> <method name="pcmk-redirect"> <device name="pcmk" port="server2"/> </method> </fence> </clusternode> <clusternode name="server3" nodeid="3" votes="1"> <fence> <method name="pcmk-redirect"> <device name="pcmk" port="server3"/> </method> </fence> </clusternode> </clusternodes> <fencedevices> <fencedevice name="pcmk" agent="fence_pcmk"/> </fencedevices> <cman/> </cluster>
[ALL] Edit /etc/corosync/corosync.conf
Find pacemaker service in /etc/corosync/corosync.conf and bump version to 1:
service { # Load the Pacemaker Cluster Resource Manager ver: 1 name: pacemaker }
Replace bindnetaddr with the IP of your network. For example:
bindnetaddr: 10.168.244.0
'0' is not a typo.
[ALL] Enable pacemaker init scripts
update-rc.d -f pacemaker remove update-rc.d pacemaker start 50 1 2 3 4 5 . stop 01 0 6 .
[ALL] Start cman service and then pacemaker service
service cman start Starting cluster: Checking if cluster has been disabled at boot... [ OK ] Checking Network Manager... [ OK ] Global setup... [ OK ] Loading kernel modules... [ OK ] Mounting configfs... [ OK ] Starting cman... [ OK ] Waiting for quorum... [ OK ] Starting fenced... [ OK ] Starting dlm_controld... [ OK ] Unfencing self... [ OK ] Joining fence domain... [ OK ]
service pacemaker start Starting Pacemaker Cluster Manager: [ OK ]
[ONE] Setup resources
Wait for a minute until pacemaker declares all nodes online: # crm status ============ Last updated: Fri Sep 7 21:18:12 2012 Last change: Fri Sep 7 21:17:17 2012 via crmd on fix Stack: cman Current DC: fix - partition with quorum Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c 2 Nodes configured, unknown expected votes 0 Resources configured. ============ Online: [ fix foxy ]