ln -s '/usr/lib/systemd/system/pcsd.service' '/etc/systemd/system/multi-
user.target.wants/pcsd.service'
$ echo hacluster | passwd hacluster --stdin
Changing password for user hacluster.
Changing password for user hacluster.
passwd: all authentication tokens updated successfully.
4.
集群认证
在任何一个节点上执行,这里选择
node1
:
$ pcs cluster auth
-u
hacluster
-p
hacluster
10.16.93.179
10.16.93.182
10.16.93.179
: Authorized
10.16.93.182
: Authorized
5.
同步配置
在
node1
上执行:
$ pcs cluster setup
--
last_man_standing
=1
--
name pgcluster
10.16.93.179
10.16.93.182
Shutting down pacemaker/corosync services
...
Redirecting
to
/bin/systemctl stop pacemaker
.
service
Redirecting
to
/bin/systemctl stop corosync
.
service
Killing any remaining services
...
Removing
all
cluster configuration files
...
10.16.93.179
: Succeeded
10.16.93.182
: Succeeded
6.
启动集群
在
node1
上执行。(有时需要稍等十几秒,才能看到命令的输出结果):
$ pcs cluster start
--all
172.17.5.90
: Starting Cluster
...
172.17.5.91
: Starting Cluster
...
172.17.5.92
: Starting Cluster
...
7.
检验
1
)检验
corosync
在
node1
上执行:
$ pcs status corosync
Membership information
----------------------
Nodeid Votes Name
1 1 10.16.93.179 (local)
2 1 10.16.93.182
2
)检验
pacemaker
root@10 data]# pcs status
Cluster name: pgcluster
WARNING: corosync and pacemaker node names
do not match (IPs used in setup?)
文档被以下合辑收录
评论