标签:png 9.png href multicast source 后端 fedora kvm ntp配置
# dnf install virt-manager libvirt
# dnf install -y ntp fence-virtd fence-virtd-multicast fence-virtd-libvirt fence-virt*
# timedatectl list-timezones | grep Shanghai # timedatectl set-timezone Asia/Shanghai
# 删除原配置中的相关配置项 # sed -e ‘/^server/d‘ -e ‘/^#server/d‘ -e ‘/^fudge/d‘ -e ‘/^#fudge/d‘ -i /etc/ntp.conf # 在结尾添加ntp服务器配置 # sed -e ‘$a server 127.127.1.0‘ -e ‘$a fudge 127.127.1.0 stratum‘ -i /etc/ntp.conf
# systemctl enable ntpd.service && systemctl start ntpd.service && systemctl status ntpd.service
ntpq -c peers ntpq -c assoc timedatectl
# mkdir -p /etc/cluster
# echo fecb9e62cbcf4e54dcfb > /etc/cluster/fence_xvm.key
# fence_virtd -c
# systemctl enable fence_virtd && systemctl start fence_virtd && systemctl status fence_virtd
# fence_xvm -o list
# 启动(on)、关机(off)、重启(reboot)、状态获取(status)
# fence_xvm -o off -H HA1 # fence_xvm -o off -H HA2 # fence_xvm -o off -H HA3
# yum install -y ntp pcs pacemaker corosync fence-agents-all resource-agents
1 # timedatectl set-timezone Asia/Shanghai 2 3 # sed -i s/^server.*// /etc/ntp.conf 4 # echo "server 192.168.43.177 iburst" >> /etc/ntp.conf 5 # echo "SYNC_HWCLOCK=yes" >> /etc/sysconfig/ntpdate 6 # systemctl enable ntpd.service && systemctl start ntpd.service && systemctl status ntpd.service
# timedatectl
# mkdir -p /etc/cluster # echo fecb9e62cbcf4e54dcfb > /etc/cluster/fence_xvm.key
# echo 000000|passwd --stdin hacluster
# pcs cluster auth ha1 ha2 ha3 -u hacluster -p 000000 --force
# pcs cluster setup --force --name openstack-ha ha1 ha2 ha3
# pcs cluster enable --all
# pcs cluster start --all
# pcs status
1 # pcs stonith create fence1 fence_xvm multicast_address=225.0.0.12 2 # pcs stonith create fence2 fence_xvm multicast_address=225.0.0.12 3 # pcs stonith create fence3 fence_xvm multicast_address=225.0.0.12
[root@ha1 ~]# pcs status Cluster name: openstack-ha Stack: corosync Current DC: ha1 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum Last updated: Thu Aug 16 15:30:59 2018 Last change: Thu Aug 16 12:44:03 2018 by root via cibadmin on ha1 3 nodes configured 3 resources configured Online: [ ha1 ha2 ha3 ] Full list of resources: fence1 (stonith:fence_xvm): Started ha1 fence2 (stonith:fence_xvm): Started ha2 fence3 (stonith:fence_xvm): Started ha3 Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled
[root@ha1 ~]# pcs stonith show fence1 (stonith:fence_xvm): Started ha1 fence2 (stonith:fence_xvm): Started ha2 fence3 (stonith:fence_xvm): Started ha3
[图文][提供可行性脚本] CentOS 7 Fencing+Pacemaker三节点搭建高可用集群
标签:png 9.png href multicast source 后端 fedora kvm ntp配置
原文地址:https://www.cnblogs.com/plus-ir/p/9484111.html