本文共 1658 字,大约阅读时间需要 5 分钟。
官方网站:http://www.clusterlabs.org/doc/crm_cli.html configure:配置资源的多数操作,都是在该层级 cib:类似于configure,只是操作的是cib shadow 进入live模式:在shell输入crm,默认进入lib模式 进入cib模式:在live模式中,输入cib new <res>,即进入cib的编辑模式 crm ra list <class> [<provider>] crm ra meta [<class>:[<provider>:]]<type> 删除节点:crm node delete <node> 停用节点:crm node standby [<node>],默认停用操作命令所在的节点 启动节点:crm node online [<node>] 设置/删除节点的attribute:crm node attribute <node> set <attr> <value> crm node attribute <node> delete <attr> 显示资源状态:crm resource status [<src>] 启用/停用资源:crm resource start/stop <src> 重启资源:crm resource restart <src> 手动迁移资源:crm resource migrate (move) <rsc> [<node>] 设置/删除资源的property: crm resource param <rsc> set <param> <value> crm resource param <rsc> delete <param> 设置/删除资源的attribute:crm resource meta <rsc> set <attr> <value> crm resource meta <rsc> delete <attr> Commands for resources are: ms/master (master-slave):创建状态克隆
There are three types of constraints: colocation:指定哪些资源启动在同一个节点 There are the cluster properties, resource meta attributes defaults, and operations defaults: property:设置集群的属性,对集群内所有资源有效 rsc_defaults:设置集群资源的默认attribute,对所有集群内所有资源有效 op_defaults:设置集群资源的meta attribute的默认操作,对所有资源有效 常用的设置:crm configure res_defaults resource-stickiness=100 本文转自 li_qinshan 51CTO博客,原文链接:http://blog.51cto.com/share/656284 转载地址:http://yivdl.baihongyu.com/