introduction_linux_clustering_1.1.pdf

(700 KB) Pobierz
INTRODUCTION TO LINUX CLUSTERING
DOCUMENT RELEASE 1.1
Copyright 2008 Jethro Carr
This document may be freely distributed provided that it is not modified and that full credit is given 
to the original author.
If you publish this document anywhere, please do let me know via email, and if it is published in a 
physical medium, sending me a copy would be appreciated.
Email:
Website:
jethro.carr@jethrocarr.com
www.jethrocarr.com
Table of Contents
 1 Introduction......................................................................................................................................4
 2 About clusters...................................................................................................................................5
 3 Advantages and reasons for clustering.............................................................................................6
 4 Clustering fundamentals...................................................................................................................8
 4.1 Basics........................................................................................................................................8
 4.2 Important clustering components.............................................................................................8
 4.2.1 Failover..............................................................................................................................8
 4.2.2 Fencing..............................................................................................................................9
 4.2.3 Split­Brain.......................................................................................................................10
 4.2.4 Quorum...........................................................................................................................10
 5 Cluster management software.........................................................................................................12
 5.1 Redhat Cluster Suite................................................................................................................12
 5.1.1 Management and Configuration......................................................................................12
 5.1.2 luci and ricci....................................................................................................................13
 5.1.3 system­config­cluster.......................................................................................................13
 5.1.4 Load balancing.................................................................................................................13
 6 Combining Xen with clusters.........................................................................................................15
 6.1 VMs  as part of main cluster...................................................................................................15
 6.2 VMs runs as a separate cluster................................................................................................15
 7 Storage Management.......................................................................................................................16
 7.1 Centralised storage...................................................................................................................16
 7.1.1 SAN – Storage area network.............................................................................................17
 7.1.2 NAS – Network Attached Storage....................................................................................18
 7.1.3  Commodity Network File Share......................................................................................19
 7.2 Access methods for centralised storage...................................................................................20
 7.2.1 Accessing SAN Directly..................................................................................................20
 7.2.2 Accessing NAS with iscsi................................................................................................20
 7.2.3 Accessing NAS with other protocols...............................................................................20
 7.3 Distributed Storage..................................................................................................................21
 7.3.1 AFS – Andrew File System..............................................................................................21
 7.3.2 Lustre...............................................................................................................................21
Introduction to Linux Clustering
 7.3.3 Coda.................................................................................................................................22
 7.4 Replicated Storage...................................................................................................................22
 7.4.1 Distributed Replicated Block Device (DRBD)................................................................22
 7.5 Clustered Filesystems..............................................................................................................24
 7.5.1 CLVM..............................................................................................................................24
 7.5.2 GFS – Global File System...............................................................................................24
 7.5.3 ext4 (Under development)...............................................................................................24
 8 Cluster Examples and Challenges..................................................................................................25
 8.1 Two node HA cluster with DRBD..........................................................................................25
 8.2 Five node HA cluster with DRBD..........................................................................................26
 8.3 Five node HA cluster with DRBD + Xen...............................................................................28
 8.4 Geographically distributed clusters.........................................................................................28
 8.4.1 Two node distributed cluster............................................................................................30
 8.4.2 Three+ node distributed cluster.......................................................................................31
 9 Further Reference...........................................................................................................................33
© Copyright 2008 Jethro Carr
Page 2/33
Introduction to Linux Clustering
© Copyright 2008 Jethro Carr
Page 3/33
Introduction to Linux Clustering
 1 Introduction
One of the oldest problems of computing is designing failure proof computing systems. Over the 
years, many different methods have been developed.
Many of these you will be familiar with, including:
Spare hardware – typically enough to mirror the production hardware.
Fault tolerant hardware by using a number of spare components.
Software failover features built into individual programs.
Hardware solutions are typically expensive (and not always 100% reliant).  Application­specific 
failover methods can often add maintenance hassles as well as doing nothing to fix the problem that 
some of your programs may have no failover capabilities at all.
In recent years, a few new options have become available ­ in particular Linux clustering and 
virtualization.
This document presents the key factors in implementing effective Linux clusters and design. Please 
note the following:
Clustering is a relatively new topic to me, and I have not had a lot of experience deploying 
and maintaining clusters.
This document is the results of my research into the options available and looks at what 
solutions could be developed. If you have experience with clusters and have found 
technologies that do or do­not work well in practice, please supply me with feedback so I 
can extend this document and make it more useful.
This document mentions Redhat Cluster Manager a bit, but doesn't go into details about the 
other major option, Linux­HA. However, most of the concepts and terminology is applicable 
for both solutions.
This document does not cover the technical details on configuring clusters, it is more of a 
high level design view.
This document will also cover the use of clustering together with Xen virtualization for maximum 
advantage.
The aim of this document is to provide you with an understanding of cluster solutions so that you 
are empowered to identify applicable technologies and decide on the best approach to use them.
© Copyright 2008 Jethro Carr
Page 4/33
Introduction to Linux Clustering
 2 About clusters
There are three main reasons to use clustering:
Better performance
Fault tolerance by high availability services.
Optimal usage of disk resources.
Often you will hear about high performance computing solutions using Linux clusters to create 
small super computers – such systems are usually referred to as “beowulf clusters”.
These systems typically run highly customised applications which are designed to run on multiple 
computer systems at once, and are beyond the scope of this document.
This document will cover the following:
High­availability clusters.
Shared storage solutions
Other clustering considerations.
© Copyright 2008 Jethro Carr
Page 5/33
Zgłoś jeśli naruszono regulamin