多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
**红帽6** # 集群资源组切换命令 clusvcadm -r service_name -m `hostname`2 把资源组切换至hostname2上 # 资源组failed时需要先disable再enable,disabled状态只能enable去解除。 clusvcadm -d `hostname`_RG clusvcadm -e `hostname`_RG -m `hostname` # 集群状态 clustat #添加切机脚本 #ccs -h `hostname` --addresource script name=test7_pkg file=/etc/cluster/test7_pkg.sh #ccs -h `hostname` --addresource script name=test8_pkg file=/etc/cluster/test8_pkg.sh #ccs -h `hostname` --addsubservice `hostname`_RG clusterfs:clusterfs:ip:script ref=test7_pkg #ccs -h `hostname` --addsubservice CBBSCX8_RG clusterfs:clusterfs:ip:script ref=test8_pkg #ccs -h `hostname` --addresource script name=mfs_pkg file=/etc/init.d/mfsclusm #ccs -h `hostname` --addsubservice DBM_RG ip:script ref=mfs_pkg #确认集群配置文件语法无问题 ccs_config_validate #同步所有节点配置文件 ccs -h `hostname` --sync --activate #确认同一集群内部所有节点的配置文件一致。 ccs -h `hostname` --checkconf ccs -h `hostname` --stopall /var/log/message会有记录成功与否信息 **红帽7:** # pcs status 查看状态 # pcs cluster status 查看集群状态 pcs cluster standby NAX12 将主机剔除集群 pcs cluster unstandby NAX12 将主机恢复至集群 pcs resource move VirtualIP CDJSX8 将资源移至某一主机 pcs cluster cib 查看集群配置文件 #/etc/corosync/corosync.conf #/var/lib/pacemaker/cib/cib.xml systemctl enable lvm2-lvmetad.socket systemctl enable lvm2-lvmetad.service systemctl start lvm2-lvmetad.socket systemctl start lvm2-lvmetad.service systemctl disable lvm2-lvmetad.socket systemctl disable lvm2-lvmetad.service systemctl stop lvm2-lvmetad.socket systemctl stop lvm2-lvmetad.service systemctl enable pacemaker.service systemctl enable corosync.service systemctl status pacemaker.service systemctl status corosync.service systemctl enable pcsd.service systemctl status pcsd.service pcs constraint colocation add VirtualIP cmcc_na1 cmcc_na cmcc_na1_fs cmcc_na_fs INFINITY pcs resource create impulz_dosemu lsb:impulz op stop interval=0 timeout=60s monitor interval=60s timeout=5s start interval=0 timeout=60s pcs resource create zabbix-server lsb:zabbix-server op monitor interval=5s pcs resource create zabbix-server systemd:zabbix-server op monitor interval=5s