diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Intro.xml b/doc/Clusters_from_Scratch/en-US/Ch-Intro.xml index 84454a092c..c2734a7832 100644 --- a/doc/Clusters_from_Scratch/en-US/Ch-Intro.xml +++ b/doc/Clusters_from_Scratch/en-US/Ch-Intro.xml @@ -1,253 +1,175 @@ - - -%BOOK_ENTITIES; -]> - - Read-Me-First -
- The Scope of this Document - - The purpose of this document is to definitively explain the concepts used to configure Pacemaker. To achieve this best, it will focus exclusively on the XML syntax used to configure the CIB. - - - For those that are allergic to XML, Pacemaker comes with a cluster shell and a Python based GUI exists, however these tools will not be covered at all in this document - - It is hoped however, that having understood the concepts explained here, that the functionality of these tools will also be more readily understood. - - , precisely because they hide the XML. - - - Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster. - -
- -
- What Is Pacemaker? - - Pacemaker is a cluster resource manager. It achieves maximum availability for your cluster services (aka. resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either OpenAIS or Heartbeat). - - - Pacemaker's key features include: - - - - - Detection and recovery of node and service-level failures - - - - - Storage agnostic, no requirement for shared storage - - - - - Resource agnostic, anything that can be scripted can be clustered - - - - - Supports STONITH for ensuring data integrity - - - - - Supports large and small clusters - - - - - Supports both quorate and resource driven clusters - - - - - Supports practically any redundancy configuration - - - - - Automatically replicated configuration that can be updated from any node - - - - - Ability to specify cluster-wide service ordering, colocation and anti-colocation - - - - - Support for advanced services type - - - - Clones: for services which need to be active on multiple nodes - - - - - Multi-state: for services with multiple modes (eg. master/slave, primary/secondary) - - - - - - - - Unified, scriptable, cluster shell - - - -
- -
- Types of Pacemaker Clusters - - Pacemaker makes no assumptions about your environment, this allows it to support practically any redundancy configuration including Active/Active, Active/Passive, N+1, N+M, N-to-1 and N-to-N. - - -
- Active/Passive Redundancy - - - - - Two-node Active/Passive clusters using Pacemaker and DRBD are a cost-effective solution for many High Availability situations. - -
-
- -
- N plus 1 Redundancy - - - - - By supporting many nodes, Pacemaker can dramatically reduce hardware costs by allowing several active/passive clusters to be combined and share a common backup node - -
-
- -
- N to N Redundancy - - - - - When shared storage is available, every node can potentially be used for failover. Pacemaker can even run multiple copies of services to spread out the workload. - -
-
-
- -
- Pacemaker Architecture - - At the highest level, the cluster is made up of three pieces: - - - - - Core cluster infrastructure providing messaging and membership functionality (illustrated in red) - - - - - Non-cluster aware components (illustrated in blue). In a Pacemaker cluster, these pieces include not only the scripts that knows how to start, stop and monitor resources, but also a local daemon that masks the differences between the different standards these scripts implement. - - - - - A brain (illustrated in green) that processes and reacts to events from the cluster (nodes leaving or joining) and resources (eg. monitor failures) as well as configuration changes from the administrator. In response to all of these events, Pacemaker will compute the ideal state of the cluster and plot a path to achieve it. This may include moving resources, stopping nodes and even forcing them offline with remote power switches. - - - - -
- Conceptual Stack Overview - - - - - Conceptual overview of the cluster stack - -
-
- - When combined with OpenAIS, Pacemaker also supports popular open source cluster filesystems - - Even though Pacemaker also supports Heartbeat, the filesystems need to use the stack for messaging and membership and OpenAIS seems to be what they're standardizing on. Technically it would be possible for them to support Heartbeat as well, however there seems little interest in this. - - Due to recent standardization within the cluster filesystem community, they make use of a common distributed lock manager which makes use of OpenAIS for its messaging capabilities and Pacemaker for its membership (which nodes are up/down) and fencing services. - - -
- The Pacemaker Stack - - - - - The Pacemaker stack when running on OpenAIS - -
-
-
- Internal Components - - Pacemaker itself is composed of four key components (illustrated below in the same color scheme as the previous diagram): - - - - - CIB (aka. Cluster Information Base) - - - - - CRMd (aka. Cluster Resource Management daemon) - - - - - PEngine (aka. PE or Policy Engine) - - - - - STONITHd - - - - -
- Internal Components - - - - - Subsystems of a Pacemaker cluster running on OpenAIS - -
-
- - The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster. The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved. - - - This list of instructions is then fed to the DC (Designated Co-ordinator). Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master. Should the elected CRMd process, or the node it is on, fail... a new one is quickly established. - - - The DC carries out the PEngine's instructions in the required order by passing them to either the LRMd (Local Resource Management daemon) or CRMd peers on other nodes via the cluster messaging infrastructure (which in turn passes them on to their LRMd process). - - - The peer nodes all report the results of their operations back to the DC and based on the expected and actual results, will either execute any actions that needed to wait for the previous one to complete, or abort processing and ask the PEngine to recalculate the ideal cluster state based on the unexpected results. - - - In some cases, it may be necessary to power off nodes in order to protect shared data or complete resource recovery. For this Pacemaker comes with STONITHd. STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch. In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure, however STONITHd takes care of understanding the STONITH topology such that its clients simply request a node be fenced and it does the rest. - -
- -
- -
+ Read-Me-First +
+ The Scope of this Document + + The purpose of this document is to definitively explain the concepts used to configure Pacemaker. + To achieve this best, it will focus exclusively on the XML syntax used to configure the CIB. + + + For those that are allergic to XML, Pacemaker comes with a cluster shell and a Python based GUI exists, however these tools will not be covered at all in this document + + It is hoped however, that having understood the concepts explained here, that the functionality of these tools will also be more readily understood. + + , precisely because they hide the XML. + + + Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. + Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster. + +
+
+ What Is Pacemaker? + + Pacemaker is a cluster resource manager. + It achieves maximum availability for your cluster services (aka. resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either Corosync or Heartbeat). + + Pacemaker's key features include: + + Detection and recovery of node and service-level failures + Storage agnostic, no requirement for shared storage + Resource agnostic, anything that can be scripted can be clustered + Supports STONITH for ensuring data integrity + Supports large and small clusters + Supports both quorate and resource driven clusters + Supports practically any redundancy configuration + Automatically replicated configuration that can be updated from any node + Ability to specify cluster-wide service ordering, colocation and anti-colocation + Support for advanced services type + + Clones: for services which need to be active on multiple nodes + Multi-state: for services with multiple modes (eg. master/slave, primary/secondary) + + + Unified, scriptable, cluster shell + +
+
+ Types of Pacemaker Clusters + Pacemaker makes no assumptions about your environment, this allows it to support practically any redundancy configuration including Active/Active, Active/Passive, N+1, N+M, N-to-1 and N-to-N. + +
+ Active/Passive Redundancy + + + + + Two-node Active/Passive clusters using Pacemaker and DRBD are a cost-effective solution for many High Availability situations. + +
+
+ +
+ Shared Failover + + + + + By supporting many nodes, Pacemaker can dramatically reduce hardware costs by allowing several active/passive clusters to be combined and share a common backup node + +
+
+ +
+ N to N Redundancy + + + + + + When shared storage is available, every node can potentially be used for failover. + Pacemaker can even run multiple copies of services to spread out the workload. + + +
+
+
+
+ Pacemaker Architecture + At the highest level, the cluster is made up of three pieces: + + + Core cluster infrastructure providing messaging and membership functionality (illustrated in red) + + + Non-cluster aware components (illustrated in blue). + In a Pacemaker cluster, these pieces include not only the scripts that knows how to start, stop and monitor resources, but also a local daemon that masks the differences between the different standards these scripts implement. + + + A brain (illustrated in green) that processes and reacts to events from the cluster (nodes leaving or joining) and resources (eg. monitor failures) as well as configuration changes from the administrator. + In response to all of these events, Pacemaker will compute the ideal state of the cluster and plot a path to achieve it. + This may include moving resources, stopping nodes and even forcing them offline with remote power switches. + + + +
+ Conceptual Stack Overview + + + + + Conceptual overview of the cluster stack + +
+
+ When combined with Corosync, Pacemaker also supports popular open source cluster filesystems + + + Even though Pacemaker also supports Heartbeat, the filesystems need to use the stack for messaging and membership and Corosync seems to be what they're standardizing on. + Technically it would be possible for them to support Heartbeat as well, however there seems little interest in this. + + + Due to recent standardization within the cluster filesystem community, they make use of a common distributed lock manager which makes use of Corosync for its messaging capabilities and Pacemaker for its membership (which nodes are up/down) and fencing services. + + +
+ The Pacemaker Stack + + + + + The Pacemaker stack when running on Corosync + +
+
+
+ Internal Components + Pacemaker itself is composed of four key components (illustrated below in the same color scheme as the previous diagram): + + CIB (aka. Cluster Information Base) + CRMd (aka. Cluster Resource Management daemon) + PEngine (aka. PE or Policy Engine) + STONITHd + + +
+ Internal Components + + + + + Subsystems of a Pacemaker cluster running on Corosync + +
+
+ + The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster. + The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved. + + + This list of instructions is then fed to the DC (Designated Co-ordinator). + Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master. + Should the elected CRMd process, or the node it is on, fail... + a new one is quickly established. + + The DC carries out the PEngine's instructions in the required order by passing them to either the LRMd (Local Resource Management daemon) or CRMd peers on other nodes via the cluster messaging infrastructure (which in turn passes them on to their LRMd process). + The peer nodes all report the results of their operations back to the DC and based on the expected and actual results, will either execute any actions that needed to wait for the previous one to complete, or abort processing and ask the PEngine to recalculate the ideal cluster state based on the unexpected results. + + In some cases, it may be necessary to power off nodes in order to protect shared data or complete resource recovery. + For this Pacemaker comes with STONITHd. + STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch. + In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure, however STONITHd takes care of understanding the STONITH topology such that its clients simply request a node be fenced and it does the rest. + +
+
+
diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-active-active.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-active-active.svg new file mode 100644 index 0000000000..c377cce410 --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-active-active.svg @@ -0,0 +1,1398 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + D'base + + + + + Web Site + + Web Site + + Web Site + + Web Site + + GFS2 + + + + + + + + Host + Host + Host + Host + + Shared Storage + CoroSync + Pacemaker + Active / Active + Hardware + ClusterSoftware + Services + GFS2 + GFS2 + GFS2 + URL + Mail + D'base + URL + Mail + D'base + URL + Mail + D'base + URL + Mail + + + + diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-active-passive.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-active-passive.svg new file mode 100644 index 0000000000..2c33fd0db2 --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-active-passive.svg @@ -0,0 +1,1027 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + URL + + + Web Site + + + + Files + + Storage + + + + + + Host + Host + Host + Host + CoroSync + Pacemaker + Active / Passive + Hardware + ClusterSoftware + Services + URL + D/base + Storage + D/base + + + + Synch + Synch + + + diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-internals.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-internals.svg new file mode 100644 index 0000000000..c2f50044f8 --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-internals.svg @@ -0,0 +1,1158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Pacemaker Internals + + + + + + crmd + + + stonithd + + cib + + pengine + + lrmd + + cluster abstraction layer + + corosync + + ccm + or + + heartbeat + + + + + + + + + + + + + + linux-ha project + + pacemaker project + + + + diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-overview.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-overview.svg new file mode 100644 index 0000000000..9fb022db44 --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-overview.svg @@ -0,0 +1,855 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Pacemaker 10,000ft + + + + + + + + Cluster Resource Manager + + + + + + Local Resource Manager + + + + + Resource Agents + + Messaging & Membership + + + + + + diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-shared-failover.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-shared-failover.svg new file mode 100644 index 0000000000..b28d09cea3 --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-shared-failover.svg @@ -0,0 +1,1306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + URL + + + + Mail + + + + + Files + + + + + Storage + + + + + + Host + Host + Host + Host + CoroSync + Pacemaker + Shared Failover + Hardware + ClusterSoftware + Services + Storage + D'base + Storage + Storage + D'base + URL + URL + Web Site + Files + + + + Synch + Synch + Synch + + + + diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg new file mode 100644 index 0000000000..ac5455799e --- /dev/null +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg @@ -0,0 +1,909 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + cLVM2 + + GFS2 + + + OCFS2 + + + + Distributed Lock Manager + + + CoroSync + + + Pacemaker + + Pacemaker Stack + Build Dependancy + + + + + + + + + + + Resource Agents + + + + + + Cluster Glue + + + + + + + + + + +