Comparison between pcs and crmsh commands

Source: Internet
Author: User

1. Concepts

1. crmsh

This project is not part of the GNU Project.

Pacemaker command line interface for management and configuration

Crmsh is a command line interface for managing pacemaker, not GNU. The latest version v1.2.6 RC 3 was released on November 29 ,.

Crmsh supports Automatic completion

2. pcs

PCS-Pacemaker/Corosync configuration system

Dedicated to setting tools for pacemaker + corosync, including CLI and web-based GUI

2. Command comparison


Show cluster settings crmsh # crm configure showpcs # pcs cluster cib show cluster status crmsh # crm_mon-1 pcs # pcs status pending node crmsh # crm node standbypcs # pcs cluster standby pcmk-1crmsh # crm node onlinepc # pcs cluster unstandby pcmk-1 set optioncrmsh # crm configure property stonith-enabled = falsepcs # pcs property set stonith-enabled = false list available resources crmsh # crm ra classespcs # pcs resource standardscrmsh # crm ra list ocf pacemakerpcs # pcs resource agents ocf: pacemaker creates a resource crmsh # crm configure primitive ClusterIP ocf: heartbeat: IPaddr2 \ params ip = 192.168.122.120 cidr_netmask = 32 \ op monitor interval = 30 spcs # pcs resource create ClusterIP IPaddr2 ip = 192.168.0.120 restart = 32 enable resource crmsh # crm resource start ClusterIPpcs # pcs resource start clusterIP close resource crmsh # crm resource stop ClusterIPpcs # pcs resource stop ClusterIP delete resource crmsh # crm configure delete ClusterIPpcs # update resource crmsh # crm configure edit ClusterIPpcs # pcs resource update ClusterIP clusterip_hash = sourceip display resource crmsh # pcs resource show WebFS resource default attribute crmsh # crm configure rsc_defaults resource-stickiness = 100 pcs # pcs resource rsc defaults resource-stickiness = 100 pcs # pcs resource rsc ults (list ults) crmsh # crm configure op_defaults timeout = 240 spcs # pcs resource op defaults timeout = 240 spcs # pcs resource op defaults relationship between resources crmsh # crm configure colocation website-with-ip INFINITY: webSite ClusterIPpcs # pcs constraint colocation add WebSite ClusterIP INFINITY resource sequence crmsh # crm configure order apache-after-ip mandatory: clusterIP websitoriginally # pcs constraint order ClusterIP then WebSite node stickiness crmsh # crm configure location prefer-pcmk-1 WebSite 50: pcmk-1pcs # pcs constraint location WebSite prefers pcmk-1 = 50 mobile resource crmsh # crm resource move WebSite pcmk-1pcs # pcs resource move WebSite pcmk-1crmsh # crm resource unmove websitepc # pcs resource unmove WebSite create clone resource 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 create master-slave resource crmsh # crm configure MS WebDataClone WebData \ meta master-max = 1 master-node-max = 1 \ clone-max = 2 clone-node-max = 1 notify = truepc # pcs resource master WebDataClone WebData \ master-max = 1 master-node-max = 1 clone-max = 2 clone-node-max = 1 \ Policy = true script crmsh # crmcrmsh # cib new drbd_javascrmsh # configure primitive WebData ocf: linbit: drbd params drbd_resource = wwwdata \ op monitor interval = 60 scrmsh # configure MS WebDataClone WebData meta master-max = 1 master-node-max = 1 \ clone-max = 2 clone-node- max = 1 running y = truecrmsh # cib commit drbd_rjcrmsh # quitpcs # pcs cluster cib drbd_1_pcs # pcs-f drbd_cfg resource create WebData ocf: linbit: drbd drbd_resource = wwwdata \ op monitor interval = 60 spcs # pcs-f drbd_cfg resource master WebDataClone WebData master-max = 1 master-node-max = 1 \ clone-max = 2 clone- node-max = 1 running y = truepc # pcs cluster push cib drbd_cfg


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.