打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
第5章创建一个主/备集群

5.1. 浏览现有配置

当Pacemaker启动的时候,它会自动记录节点的数量和详细信息,以及基层软件(本文中是corosync)和Pacemaker的版本。
这是初始配置文件的模样:
# crm configure shownode pcmk-1node pcmk-2property $id="cib-bootstrap-options"     dc-version="1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f"     cluster-infrastructure="openais"     expected-quorum-votes="2"
For those that are not of afraid of XML, you can see the raw configuration by appending "xml" to the previous command.
这是本文档最后一次显示XML。(作者怨念很深啊)
# crm configure show xml<?xml version="1.0" ?><cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="pcmk-1" epoch="13" have-quorum="1" num_updates="7" validate-with="pacemaker-1.0"> <configuration>  <crm_config>   <cluster_property_set id="cib-bootstrap-options">    <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f"/>    <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="openais"/>    <nvpair id="cib-bootstrap-options-expected-quorum-votes" name="expected-quorum-votes" value="2"/>   </cluster_property_set>  </crm_config>  <rsc_defaults/>  <op_defaults/>  <nodes>   <node id="pcmk-1" type="normal" uname="pcmk-1"/>   <node id="pcmk-2" type="normal" uname="pcmk-2"/>  </nodes>  <resources/>  <constraints/> </configuration></cib>
在我们做出任何改变之前,我们最好检查下配置文件。
# crm_verify -Lcrm_verify[2195]: 2009/08/27_16:57:12 ERROR: unpack_resources: Resource start-up disabled since no STONITH resources have been definedcrm_verify[2195]: 2009/08/27_16:57:12 ERROR: unpack_resources: Either configure some or disable STONITH with the stonith-enabled optioncrm_verify[2195]: 2009/08/27_16:57:12 ERROR: unpack_resources: NOTE: Clusters with shared data need STONITH to ensure data integrityErrors found during check: config not valid -V may provide more details#
就像你看到的,这个工具发现了一些错误。
In order to guarantee the safety of your data [12] , Pacemaker ships with STONITH [13] enabled. However it also knows when no STONITH configuration has been supplied and reports this as a problem (since the cluster would not be able to make progress if a situation requiring node fencing arose).
目前,我们禁用这个特性,然后在 配置STONISH 章节来配置它。这里要指出,使用STONITH是非常有必要的。关闭这个特性就是告诉集群:假装故障的节点已经安全的关机了。一些供应商甚至不允许这个特性被关闭。
我们将 stonith-enabled设置为 false 来关闭STONITH
# crm configure property stonith-enabled=false# crm_verify -L
设置完这个选项以后,校验配置文件就正常了。

警告

The use of stonith-enabled=false is completely inappropriate for a production cluster. We use it here to defer the discussion of its configuration which can differ widely from one installation to the next. See 第 9.1 节 “What Is STONITH” for information on why STONITH is important and details on how to configure it.    
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
HA 集群基本概念详解
Mysql+Corosync+Pacemaker+DRBD构建高可用Mysql
corosync openais pacemaker构建高可用性集群
pacemaker配置一个三节点主备集群并配置vip资源
构建Heartbeat 3.0.3 GUI+DRBD+Oracle 10g 双机互备...
18.3 Heartbeat的组成与原理
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服