pcs與crmsh命令比較

來源:互聯網
上載者:User

一.概念

1.crmsh

This project is not part of the GNU Project.

Pacemaker command line interface for management and configuration

crmsh不屬於GNU,是管理pacemaker的命令列介面,最新版本v1.2.6 RC 3 2013-8-29日發布

crmsh支援自動補全

2.pcs

PCS - Pacemaker/Corosync configuration system

專用於pacemaker+corosync的設定工具,有CLI和web-based GUI介面

二.命令比較


顯示叢集設定crmsh # crm configure showpcs   # pcs cluster cib顯示叢集狀態crmsh # crm_mon -1pcs   # pcs status掛起節點crmsh # crm node standbypcs   # pcs cluster standby pcmk-1crmsh # crm node onlinepcs   # pcs cluster unstandby pcmk-1設定optioncrmsh # crm configure property stonith-enabled=falsepcs   # pcs property set stonith-enabled=false列出可用資源crmsh # crm ra classespcs   # pcs resource standardscrmsh # crm ra list ocf pacemakerpcs   # pcs resource agents ocf:pacemaker建立資源crmsh # crm configure primitive ClusterIP ocf:heartbeat:IPaddr2 \        params ip=192.168.122.120 cidr_netmask=32 \        op monitor interval=30spcs   # pcs resource create ClusterIP IPaddr2 ip=192.168.0.120 cidr_netmask=32開啟資源crmsh # crm resource start ClusterIPpcs   # pcs resource start ClusterIP關閉資源crmsh # crm resource stop ClusterIPpcs   # pcs resource stop ClusterIP刪除資源crmsh # crm configure delete ClusterIPpcs   #更新資源crmsh # crm configure edit ClusterIPpcs   # pcs resource update ClusterIP clusterip_hash=sourceip顯示資源crmsh #pcs   # pcs resource show WebFS資源預設屬性crmsh # crm configure rsc_defaults resource-stickiness=100pcs   # pcs resource rsc defaults resource-stickiness=100pcs   # pcs resource rsc defaults(列出defaults)操作的預設屬性crmsh # crm configure op_defaults timeout=240spcs   # pcs resource op defaults timeout=240spcs # pcs resource op defaults資源間關係crmsh # crm configure colocation website-with-ip INFINITY: WebSite ClusterIPpcs   # pcs constraint colocation add WebSite ClusterIP INFINITY資源順序crmsh # crm configure order apache-after-ip mandatory: ClusterIP WebSitepcs   # pcs constraint order ClusterIP then WebSite節點粘性crmsh # crm configure location prefer-pcmk-1 WebSite 50: pcmk-1pcs   # pcs constraint location WebSite prefers pcmk-1=50移動資源crmsh # crm resource move WebSite pcmk-1pcs   # pcs resource move WebSite pcmk-1crmsh # crm resource unmove WebSitepcs   # pcs resource unmove WebSite建立複製資源crmsh # configure clone WebIP ClusterIP meta globally-unique="true" clone-max="2" clone-node-max="2"pcs   # pcs resource clone ClusterIP globally-unique=true clone-max=2 clone-node-max=2建立主從資源crmsh # crm configure ms WebDataClone WebData \        meta master-max=1 master-node-max=1 \        clone-max=2 clone-node-max=1 notify=truepcs   # pcs resource master WebDataClone WebData \        master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 \        notify=true指令碼crmsh # crmcrmsh # cib new drbd_cfgcrmsh # configure primitive WebData ocf:linbit:drbd params drbd_resource=wwwdata \        op monitor interval=60scrmsh # configure ms WebDataClone WebData meta master-max=1 master-node-max=1 \        clone-max=2 clone-node-max=1 notify=truecrmsh # cib commit drbd_cfgcrmsh # quitpcs   # pcs cluster cib drbd_cfgpcs   # pcs -f drbd_cfg resource create WebData ocf:linbit:drbd drbd_resource=wwwdata \        op monitor interval=60spcs   # pcs -f drbd_cfg resource master WebDataClone WebData master-max=1 master-node-max=1 \        clone-max=2 clone-node-max=1 notify=truepcs   # pcs cluster push cib drbd_cfg


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.