Requirements - Root access to the server.
- Access to an up to date Ubuntu repository.
- Source code that has been patched for pengine issues.
Section 1: Set up Crossover Cable for Pacemaker and DRBD traffic
For both nodes:
-
On the second NIC of each cluster machine, connect a crossover cable.
- If the second NIC is not already configured, add something similar to this to the bottom of /etc/network/interfaces:
auto eth1 iface eth1 inet static address 192.168.200.3 netmask 255.255.255.0
-
Restart the networking service: /etc/init.d/networking restart
-
Check to see if the new interface is up: ifconfig -a
Section 2: Pacemaker, Corosync Install and Initial Configuration
For both nodes:
-
Update the repository DB: aptitude update - aptitude install install build-essential pacemaker corosync
- Pacemaker version 1.0.8+hg15494-2ubuntu2 has pengine flaws that can cause the cluster to crash. Check to see what is installed, and follow instructions to create a debian package using patched source if needed.
- Create /etc/corosync/corosync.conf. (See attached example.)
- Make sure that the crossover connection is the first connection in the config. This will help prevent the connection from not coming up, and both nodes being assigned the same node number based on the NIC IP address.
- Create /etc/corosync/authkey and copy it to all cluster nodes: corosync-keygen
- Verify that /etc/corosync/authkey is owner=root, group=root, and 400 on all nodes.
- Put this line in /etc/rc.local: /usr/sbin/corosync-cfgtool -r
- Change the entry in /etc/default/corosync from no to yes to allow corosync to start at boot.
- Restart server: sync;sync;init 6
- Check cluster status: crm_mon
Section 3: DRBD and Filesystem Configuration
- Create a partition, leaving space at the end of the disk for metadata: cfdisk /dev/<partition>
- Update the repository DB: aptitude update
-
Install Linux headers: aptitude install linux-headers-<kernel-rev-server>
-
Install DRDB: aptitude install drbd8-utils
-
Edit the DRBD config: vi /etc/drbd.conf
-
Update the
"r0" "r1" resources, etc with the required information. (Hostname, ip
assigned to the crossover link at each end, device that is to be
mirrored.) Make sure that the meta data type is correct. -
Create the resource - both nodes: drbdadm create-md <resource_name or all>
-
Attach the resource - both nodes : drbdadm attach <resource_name or all>
-
Connect the resources - both nodes: drbdadm connect <resource_name or all> chgrp haclient /sbin/drbdsetup chmod o-x /sbin/drbdsetup chmod u+s /sbin/drbdsetup chgrp haclient /sbin/drbdmeta chmod o-x /sbin/drbdmeta chmod u+s /sbin/drbdmeta Decide which node is primary - this will be the one that has current data that needs to be retained. (If any.) Start synchronization - primary node only: drbdadm -- --overwrite-data-of-peer primary <resource_name or all> Check syncronization - both nodes: while [ 1 ]; do cat /proc/drbd; sleep 5; done On one node make the disk set(s) available: drbdadm primary all mkfs -t ext4 /dev/drbd<x> - mkdir </mountpoint>
Section 4: Configure IPMI (via ILO on HP DL360 G6s Running Ubuntu)
- Choose an IP address for the ILO interface.
- Connect the ILO interface to the network.
- While the server is booting, press a key to see the boot messages when prompted.
- Press F8 to enter the ILO configuration when prompted.
- Arrow over to the User menu; create a new user and password will full access, then save.
- Arrow over to Network, then to DNS/DHCP.
- Change DHCP Enable to OFF by pressing the spacebar.
- Exit ILO, allow server to boot.
- Reboot server - when server is coming back up, go back to the ILO configuration.
- Select network, put in the IP address, netmask, and gateway.
- Exit ILO, allow server to boot.
- Put in the HP Agent CDROM
- mount /dev/cdrom /cdrom/
- apt-cdrom -m -d=/cdrom add
- aptitude update
- Install HP Agents: aptitude install hpacucli hp-health hponcfg hp-snmp-agents hpsmh
- Install IPMI packages: aptitude install ipmitool openipmi openhpi-plugin-ipmidirect openhpi-plugin-ipmi libopenipmi0
- If you see this error, follow the next step.: ipmievd: using pidfile /var/run/ipmievd.pid0
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory Unable to open interface invoke-rc.d: initscript ipmievd, action "start" failed. Unable to start ipmievd during installation. Trying to disable. - Download ipmi.init.basic (available on this page), and run it:./ipmi.init.basic
- Test: /usr/bin/ipmitool -I lanplus -U <ILO_USERNAME> -H <IP_to_ILO> -a chassis power status
Section 4: Create Pacemaker Resources Configure STONITH Resources This is an example for IPMI over HP ILO.- crm
- configure
- primitive <stonith_server-1> stonith:external/ipmi \
- params hostname="<LNX-SERVER-1>" ipaddr="<191.168.1>" userid="<stonith>" passwd="<yourpass>" interface="lanplus" \
- op monitor interval="15" timeout="15"
- location <stonith_server-1_loc> <stonith_server-1> rule -inf: \#uname ne <LNX-SERVER-2>
- If no errors, then exit, and say yes to commiting changes.
Configure 2 Node Cluster to Fail Over Properly via CRM shell - crm
- configure
- property no-quorum-policy=ignore
- commit
Configure DRBD Resource- Remove /etc/rc scripts for DRBD: update-rc.d -f drbd remove
- crm
- configure
- primitive <drbd0_rsc> ocf:linbit:drbd \
- params drbd_resource="<filesystem_name>" \
- op monitor interval="15s" \
- op start timeout="240" \
- op stop timeout="100"
ms <ms-drbd0> <drbd0_rsc> \ - meta master-max="1" master-node-max="1" \
- clone-max="2" clone-node-max="1" \
- notify="true"
- location <ms-drbd0-master-on-SERVER-1> <ms-drbd0> \
- rule $id="<ms-drbd0-master-on-SERVER-1-rule>" $role="master" 100: #uname eq <SERVER-1>
- If no errors, then exit, and say yes to commiting changes.
|
 Updating...
Cubicle Graffiti, May 9, 2011, 1:36 PM
Cubicle Graffiti, Sep 13, 2011, 12:53 PM
|