Product SiteDocumentation Site

Pacemaker 1.1

Clusters from Scratch

Creating Active/Passive and Active/Active Clusters on Fedora

Edition 3

Andrew Beekhof

Red Hat

Legal Notice

Copyright © 2010 Andrew Beekhof This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt).
Abstract
The purpose of this document is to provide a start-to-finish guide to building an example active/passive cluster with Pacemaker and show how it can be converted to an active/active one.
The example cluster will use:
  1. Fedora 13 as the host operating system
  2. Corosync to provide messaging and membership services,
  3. Pacemaker to perform resource management,
  4. DRBD as a cost-effective alternative to shared storage,
  5. GFS2 as the cluster filesystem (in active/active mode)
  6. The crm shell for displaying the configuration and making changes
Given the graphical nature of the Fedora install process, a number of screenshots are included. However the guide is primarily composed of commands, the reasons for executing them and their expected outputs.

Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. We Need Feedback!
1. Read-Me-First
1.1. The Scope of this Document
1.2. What Is Pacemaker?
1.3. Types of Pacemaker Clusters
1.4. Pacemaker Architecture
1.4.1. Internal Components
2. Installation
2.1. OS Installation
2.2. Cluster Software Installation
2.2.1. Security Shortcuts
2.2.2. Install the Cluster Software
2.3. Before You Continue
2.4. Setup
2.4.1. Finalize Networking
2.4.2. Configure SSH
2.4.3. Short Node Names
2.4.4. Configuring Corosync
2.4.5. Propagate the Configuration
3. Verify Cluster Installation
3.1. Verify Corosync Installation
3.2. Verify Pacemaker Installation
4. Using Pacemaker Tools
5. Creating an Active/Passive Cluster
5.1. Exploring the Existing Configuration
5.2. Adding a Resource
5.3. Perform a Failover
5.3.1. Quorum and Two-Node Clusters
5.3.2. Prevent Resources from Moving after Recovery
6. Apache - Adding More Services
6.1. Installation
6.2. Preparation
6.3. Enable the Apache status URL
6.4. Update the Configuration
6.5. Ensuring Resources Run on the Same Host
6.6. Controlling Resource Start/Stop Ordering
6.7. Specifying a Preferred Location
6.8. Manually Moving Resources Around the Cluster
6.8.1. Giving Control Back to the Cluster
7. Replicated Storage with DRBD
7.1. Install the DRBD Packages
7.2. Configure DRBD
7.2.1. Create A Partition for DRBD
7.2.2. Write the DRBD Config
7.2.3. Initialize and Load DRBD
7.2.4. Populate DRBD with Data
7.3. Configure the Cluster for DRBD
7.3.1. Testing Migration
8. Conversion to Active/Active
8.1. Requirements
8.2. Install a Cluster Filesystem - GFS2
8.3. Setup Pacemaker-GFS2 Integration
8.3.1. Add the DLM service
8.3.2. Add the GFS2 service
8.4. Create a GFS2 Filesystem
8.4.1. Preparation
8.4.2. Create and Populate an GFS2 Partition
8.5. Reconfigure the Cluster for GFS2
8.6. Reconfigure Pacemaker for Active/Active
8.6.1. Testing Recovery
9. Configure STONITH
9.1. Why You Need STONITH
9.2. What STONITH Device Should You Use
9.3. Configuring STONITH
9.3.1. Example
A. Configuration Recap
A.1. Final Cluster Configuration
A.2. Node List
A.3. Cluster Options
A.4. Resources
A.4.1. Default Options
A.4.2. Fencing
A.4.3. Service Address
A.4.4. Distributed lock manager
A.4.5. GFS control daemon
A.4.6. DRBD - Shared Storage
A.4.7. Cluster Filesystem
A.4.8. Apache
B. Sample Corosync.conf
C. Further Reading
D. Revision History
Index