PCs common commands

Source: Internet
Author: User
Tags apc config
 Install the HA component: Yum install PCs fence-agents-all create cluster pcs cluster setup--start--name my_cluster z1.example.com z2.example.  COM Start Cluster service PCs cluster enable--all view cluster status PCs cluster status Create Stonith device pcs stonith create MYAPC FENCE_APC_SNMP params Ipaddr= "zapc.example.com" pcmk_host_map= "Z1.example.com:1;z2.example.com:2" pcmk_host_check= "Static-list" Pcmk_ Host_list= "z1.example.com,z2.example.com" login= "APC" passwd= "APC" PCs stonith show MYAPC creating Resources PCs resource Create My_lv  M LVM volgrpname=my_vg exclusive=true--group apachegroup pcs resource Show PCs resource enable PCs resource create My_fs Filesystem device= "/dev/my_vg/my_lv" directory= "/var/www" fstype= "Ext4"--group apachegroup PCs resource Create Virtualip IPaddr2 ip=198.51.100.3 cidr_netmask=24--group apachegroup pcs resource create Website Apache configfile= "/etc /httpd/conf/httpd.conf "statusurl=" Http://127.0.0.1/server-status "--group apachegroup 
PCS resource Create Virtualip ocf:heartbeat:IPaddr2 ip=192.16 8.0.120 cidr_netmask=24 opmonitorinterval= 30s


To view cluster status:
PCS status
Switching nodes: PCs cluster standby z1.example.compcs cluster Unstandby z1.example.com
View Help for PCs resource-h
Export and backup configuration Files PCs cluster CIB testfilepcs Config backuppcs config restorepcs cluster setup--name new_cluster NodeA NodeB--tok En 10000--join 100pcs cluster stoppcs cluster enablepcs cluster disablepcs cluster node add nodepcs cluster node remove n ODEPCS cluster standby nodepcs cluster unstandby nodepcs stonith listpcs stonith describepcs stonith show--fullpcs stonit H Create myapc-west-13 fence_apc pcmk_host_list= "west-13" ipaddr= "WEST-APC" login= "APC" passwd= "APC" port= "15"
Fence corresponding node: PCs stonith fence nodepcs Resource Delete virtualippcs resource describe Lvmpcs resource show--fullpcs Resource Enable resource_id
PCS resource Disable resource_id

Set resource succession relationship PCs constraint virtualip then Dummy_resource kind=optional
Enter Maintenance Mode: PCs resource unmanage Resource1
Release Maintenance Mode
PCS Resource Manage Resource1

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.