MySQL DRBD.pdf

(1214 KB) Pobierz
Overview: Clustering MySQL
with DRBD & Pacemaker
Trent Lloyd <trent.lloyd@oracle.com>
Copyright 2010 Trent Lloyd, Oracle
The World’s Most Popular Open Source Database
1
Overview
• Software Packages (OpenAIS, Pacemaker/CRM,
DRBD)
• Concepts
• Setup & configuration
– Installing packages
– Configure OpenAIS
– Configure DRBD
– Configure MySQL
– Configuring Pacemaker CRM
– Confirm Cluster Status
– Basic Troubleshooting
• Questions & Discussion
• Live Demo
Copyright 2010 Trent Lloyd, Oracle
The World’s Most Popular Open Source Database
2
Software Packages
• OpenAIS (“Cluster manager”) -
replaces ha.cf
– Manages the discovery of nodes, their status and transmission
of cluster state information between them. “Heartbeat 3.0” is
also available, but it is deprecated in favour of OpenAIS.
• Pacemaker (“Resource Manager”) -
replaces haresources
– Communicates over OpenAIS to co-ordinate the starting,
stopping and migration of resources between nodes. Also deals
with policy decisions such as where to place a resource, what
order they should be started in and if they should run on the
same node.
• DRBD
– Network-based disk replication, creates a “shared disk” between
2 nodes that is also copied to both nodes, for purposes of
redundancy.
• MySQL
Copyright 2010 Trent Lloyd, Oracle
The World’s Most Popular Open Source Database
3
CC-BY-SA Source: http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-intro-redundancy.html
Copyright 2010 Trent Lloyd, Oracle
The World’s Most Popular Open Source Database
4
Setup & Configuration - Packages
• RHEL 5 / CentOS 5
• RPM
http://www.clusterlabs.org/wiki/Install#Installing_on_EPEL_Compatible_Distributions:_RHEL.2C_CentOS.2C_etc
– rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/
epel-release-5-3.noarch.rpm
– wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/
rpm/epel-5/clusterlabs.repo
– yum install -y pacemaker corosync drbd83 kmod-drbd83 drbd-
pacemaker drbd-utils
• MySQL
– RPM download from website
– MySQL-server, MySQL-shared, MySQL-client
– rpm -Uvh MySQL-*
Copyright 2010 Trent Lloyd, Oracle
The World’s Most Popular Open Source Database
5
Zgłoś jeśli naruszono regulamin