本文共 1993 字,大约阅读时间需要 6 分钟。
cluster infrastructure
crmRA:lsb(/etc/init.d/),ocf(provides),legacy HB v1,stonithheartbeat
corosynccman(cluster manager)keepalivedhb v1:haresources
hb v2:crmhb v3:pacemakerrhcs:rgmanagerRHCS:
cmanrgmanagerra:internalscript:lsb/etc/rc.d/init.d/*法定票数(投票系统,quorum)
/etc/openais/openais.conf/etc/corosync/corosync.confrhcs:/etc/cluster/cluster.confRHCS:
corosync(cman)pacemaker(rgmanager)gfs:global file system
gfs2dlm:distributed lock managerocfs2:oracle cluster file systemgfs:google file systemlvm:logical volume manager逻辑卷管理器
clvm:cluster lvm集群逻辑卷管理器借助于HA的功能,将某节点对lvm操作通知给其它节点vim /etc/lvm.conf
locking_typeRHCS:
CCS:cluster configuration system(ccsd:服务守护进程)CMAN:/etc/cluster/cluster.confRHCS:failover domain
服务故障转移域:serviceHA server:VIP,httpd,filesystem
软件、系统安装
命令:for,ssh配置文件管理、软件分发:puppetRHCS:luci/ricci
rhel6.4:pcscman:openais
rgmangersystem-config-clusterHA:
node1:node1.magedu.com 172.16.100.6跳板机:stepping.magedu.com 172.16.100.100
前提:
1.时间同步2.名称解析,且每个主机的主机名与其uname -n 保持一致3.配置好每个节点的yumRHCS:
cman,rgmanager,system-config-clusterRHCS:
1.每个集群都有唯一集群名称2.至少有一个fence设备3.至少应该有三个节点,两个节点的场景中要使用仲裁磁盘资源:
viphttpd在跳板机上:
alias ha='for i in {1..3};do'ha ssh node$i 'yum -y install cman rgmanager system-config-cluster';doneha ssh node$i 'service rgmanager start' ; done
mkdir /web/htdocs
vim /etc/exports/web/htdocs 172.16.0.0(ro)node1:
rpm -ql cman | lessfence_vmwarefence_manualsystem-config-cluster &
service cman startcman_tool status
clustatclusvcadmcman_tool servicesclusvcadm -lclusvcadm -uclusvcadm -r webservice -m node2.magedu.comclusvcadm -r webservicecman_tool nodesclusvcadm -s webserviceccs_tool create tclusterccs_tool addfence meatware fence_manual ccs_tool addnode -v 1 -n 1 -f meatware node1.magedu.comccs_tool addnode -v 1 -n 2 -f meatware node2.magedu.comccs_tool addnode -v 1 -n 3 -f meatware node3.magedu.comnode2:
service cman startnode3:
service cman start虚拟机迁移:
实时迁移转载于:https://blog.51cto.com/12406012/2368225