Product SiteDocumentation Site

Appendix A. Configuration Recap

Table of Contents

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. DRBD - Shared Storage
A.4.5. Cluster Filesystem
A.4.6. Apache

A.1. Final Cluster Configuration

# pcs resource
 Master/Slave Set: WebDataClone [WebData]
     Masters: [ pcmk-2 pcmk-1 ]
 Clone Set: dlm-clone [dlm]
     Started: [ pcmk-2 pcmk-1 ]
 Clone Set: ClusterIP-clone [ClusterIP] (unique)
     ClusterIP:0        (ocf::heartbeat:IPaddr2) Started
     ClusterIP:1        (ocf::heartbeat:IPaddr2) Started
 Clone Set: WebFS-clone [WebFS]
     Started: [ pcmk-1 pcmk-2 ]
 Clone Set: WebSite-clone [WebSite]
     Started: [ pcmk-1 pcmk-2 ]
# pcs resource defaults
resource-stickiness: 100
# pcs resource op defaults
timeout: 240s
# pcs stonith
 impi-fencing   (stonith:fence_ipmilan) Started
# pcs property
dc-version: 1.1.8-1.el7-60a19ed12fdb4d5c6a6b6767f52e5391e447fec0
cluster-infrastructure: corosync
no-quorum-policy: ignore
stonith-enabled: true
# pcs constraint
Location Constraints:
Ordering Constraints:
  ClusterIP-clone then WebSite-clone
  WebDataClone then WebSite-clone
  WebFS-clone then WebSite-clone
Colocation Constraints:
  WebSite-clone with ClusterIP-clone
  WebFS-clone with WebDataClone (with-rsc-role:Master)
  WebSite-clone with WebFS-clone
#
# pcs status

Last updated: Fri Sep 14 13:45:34 2012
Last change: Fri Sep 14 13:43:13 2012 via cibadmin on pcmk-1
Stack: corosync
Current DC: pcmk-1 (1) - partition with quorum
Version: 1.1.8-1.el7-60a19ed12fdb4d5c6a6b6767f52e5391e447fec0
2 Nodes configured, unknown expected votes
11 Resources configured.

Online: [ pcmk-1 pcmk-2 ]

Full list of resources:

 Master/Slave Set: WebDataClone [WebData]
     Masters: [ pcmk-2 pcmk-1 ]
 Clone Set: dlm-clone [dlm]
     Started: [ pcmk-1 pcmk-2 ]
 Clone Set: ClusterIP-clone [ClusterIP] (unique)
     ClusterIP:0        (ocf::heartbeat:IPaddr2):       Started pcmk-1
     ClusterIP:1        (ocf::heartbeat:IPaddr2):       Started pcmk-2
 Clone Set: WebFS-clone [WebFS]
     Started: [ pcmk-1 pcmk-2 ]
 Clone Set: WebSite-clone [WebSite]
     Started: [ pcmk-1 pcmk-2 ]
 impi-fencing   (stonith:fence_ipmilan):        Started
In xml it should look similar to this.
<cib admin_epoch="0" cib-last-written="Fri Sep 14 13:43:13 2012" crm_feature_set="3.0.6" dc-uuid="1" epoch="47" have-quorum="1" num_updates="50" update-client="cibadmin" update-origin="pcmk-1" validate-with="pacemaker-1.2">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.8-1.el7-60a19ed12fdb4d5c6a6b6767f52e5391e447fec0"/>
        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
        <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
        <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="1" type="normal" uname="pcmk-1"/>
      <node id="2" type="normal" uname="pcmk-2"/>
    </nodes>
    <resources>
      <master id="WebDataClone">
        <primitive class="ocf" id="WebData" provider="linbit" type="drbd">
          <instance_attributes id="WebData-instance_attributes">
            <nvpair id="WebData-instance_attributes-drbd_resource" name="drbd_resource" value="wwwdata"/>
          </instance_attributes>
          <operations>
            <op id="WebData-interval-60s" interval="60s" name="monitor"/>
          </operations>
        </primitive>
        <meta_attributes id="WebDataClone-meta_attributes">
          <nvpair id="WebDataClone-meta_attributes-master-node-max" name="master-node-max" value="1"/>
          <nvpair id="WebDataClone-meta_attributes-clone-max" name="clone-max" value="2"/>
          <nvpair id="WebDataClone-meta_attributes-clone-node-max" name="clone-node-max" value="1"/>
          <nvpair id="WebDataClone-meta_attributes-notify" name="notify" value="true"/>
          <nvpair id="WebDataClone-meta_attributes-master-max" name="master-max" value="2"/>
        </meta_attributes>
      </master>
      <clone id="dlm-clone">
        <primitive class="ocf" id="dlm" provider="pacemaker" type="controld">
          <instance_attributes id="dlm-instance_attributes"/>
          <operations>
            <op id="dlm-interval-60s" interval="60s" name="monitor"/>
          </operations>
        </primitive>
        <meta_attributes id="dlm-clone-meta">
          <nvpair id="dlm-clone-max" name="clone-max" value="2"/>
          <nvpair id="dlm-clone-node-max" name="clone-node-max" value="1"/>
        </meta_attributes>
      </clone>
      <clone id="ClusterIP-clone">
        <primitive class="ocf" id="ClusterIP" provider="heartbeat" type="IPaddr2">
          <instance_attributes id="ClusterIP-instance_attributes">
            <nvpair id="ClusterIP-instance_attributes-ip" name="ip" value="192.168.0.120"/>
            <nvpair id="ClusterIP-instance_attributes-cidr_netmask" name="cidr_netmask" value="32"/>
            <nvpair id="ClusterIP-instance_attributes-clusterip_hash" name="clusterip_hash" value="sourceip"/>
          </instance_attributes>
          <operations>
            <op id="ClusterIP-interval-30s" interval="30s" name="monitor"/>
          </operations>
        </primitive>
        <meta_attributes id="ClusterIP-clone-meta">
          <nvpair id="ClusterIP-globally-unique" name="globally-unique" value="true"/>
          <nvpair id="ClusterIP-clone-max" name="clone-max" value="2"/>
          <nvpair id="ClusterIP-clone-node-max" name="clone-node-max" value="2"/>
        </meta_attributes>
      </clone>
      <clone id="WebFS-clone">
        <primitive class="ocf" id="WebFS" provider="heartbeat" type="Filesystem">
          <instance_attributes id="WebFS-instance_attributes">
            <nvpair id="WebFS-instance_attributes-device" name="device" value="/dev/drbd/by-res/wwwdata"/>
            <nvpair id="WebFS-instance_attributes-directory" name="directory" value="/var/www/html"/>
            <nvpair id="WebFS-instance_attributes-fstype" name="fstype" value="gfs2"/>
          </instance_attributes>
          <meta_attributes id="WebFS-meta_attributes"/>
        </primitive>
        <meta_attributes id="WebFS-clone-meta"/>
      </clone>
      <clone id="WebSite-clone">
        <primitive class="ocf" id="WebSite" provider="heartbeat" type="apache">
          <instance_attributes id="WebSite-instance_attributes">
            <nvpair id="WebSite-instance_attributes-configfile" name="configfile" value="/etc/httpd/conf/httpd.conf"/>
            <nvpair id="WebSite-instance_attributes-statusurl" name="statusurl" value="http://localhost/server-status"/>
          </instance_attributes>
          <operations>
            <op id="WebSite-interval-1min" interval="1min" name="monitor"/>
          </operations>
        </primitive>
        <meta_attributes id="WebSite-clone-meta"/>
      </clone>
      <primitive class="stonith" id="impi-fencing" type="fence_ipmilan">
        <instance_attributes id="impi-fencing-instance_attributes">
          <nvpair id="impi-fencing-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="pcmk-1 pcmk-2"/>
          <nvpair id="impi-fencing-instance_attributes-ipaddr" name="ipaddr" value="10.0.0.1"/>
          <nvpair id="impi-fencing-instance_attributes-login" name="login" value="testuser"/>
          <nvpair id="impi-fencing-instance_attributes-passwd" name="passwd" value="acd123"/>
        </instance_attributes>
        <operations>
          <op id="impi-fencing-interval-60s" interval="60s" name="monitor"/>
        </operations>
      </primitive>
    </resources>
    <constraints>
      <rsc_colocation id="colocation-WebSite-ClusterIP-INFINITY" rsc="WebSite-clone" score="INFINITY" with-rsc="ClusterIP-clone"/>
      <rsc_order first="ClusterIP-clone" first-action="start" id="order-ClusterIP-WebSite-mandatory" then="WebSite-clone" then-action="start"/>
      <rsc_colocation id="colocation-WebFS-WebDataClone-INFINITY" rsc="WebFS-clone" score="INFINITY" with-rsc="WebDataClone" with-rsc-role="Master"/>
      <rsc_colocation id="colocation-WebSite-WebFS-INFINITY" rsc="WebSite-clone" score="INFINITY" with-rsc="WebFS-clone"/>
      <rsc_order first="WebFS-clone" id="order-WebFS-WebSite-mandatory" then="WebSite-clone"/>
      <rsc_order first="WebDataClone" first-action="promote" id="order-WebDataClone-WebFS-mandatory" then="WebFS-clone" then-action="start"/>
    </constraints>
    <rsc_defaults>
      <meta_attributes id="rsc_defaults-options">
        <nvpair id="rsc_defaults-options-resource-stickiness" name="resource-stickiness" value="100"/>
      </meta_attributes>
    </rsc_defaults>
    <op_defaults>
      <meta_attributes id="op_defaults-options">
        <nvpair id="op_defaults-options-timeout" name="timeout" value="240s"/>
      </meta_attributes>
    </op_defaults>
  </configuration>
</cib>