创建集群
上个教程也创建了集群,如果创建了这里就不需要创建了。
root@shaonian:~# pvecm create yunwei-clusterCorosync Cluster Engine Authentication key generator.Gathering 1024 bits for key from /dev/urandom.Writing corosync key to /etc/corosync/authkey.Writing corosync config to /etc/pve/corosync.confRestart corosync and cluster filesystemroot@shaonian:~#查看集群状态
root@shaonian:~# pvecm statusQuorum information------------------Date: Mon May 20 16:23:08 2019Quorum provider: corosync_votequorumNodes: 1Node ID: 0x00000001Ring ID: 1/8Quorate: YesVotequorum information----------------------Expected votes: 1Highest expected: 1Total votes: 1Quorum: 1 Flags: Quorate Membership information---------------------- Nodeid Votes Name0x00000001 1 192.168.108.200 (local)root@shaonian:~#查看集群节点
root@shaonian:~# pvecm nodesMembership information---------------------- Nodeid Votes Name 1 1 192.168.108.200 (local)root@shaonian:~#登录到其余节点
IP为创建集群的节点IP
root@proxmox2:~# pvecm add 192.168.108.200Please enter superuser (root) password for '192.168.108.200': Password for root@192.168.108.200: ******Establishing API connection with host '192.168.108.200'The authenticity of host '192.168.108.200' can't be established.X509 SHA256 key fingerprint is 77:48:DE:3A:E7:59:C0:47:0D:F1:6A:1A:ED:70:86:C3:53:EC:A3:D8:C6:2C:63:53:E5:46:15:C2:EB:7B:BC:0C.Are you sure you want to continue connecting (yes/no)? yesLogin succeeded.Request addition of this nodeJoin request OK, finishing setup locallystopping pve-cluster servicebackup old database to '/var/lib/pve-cluster/backup/config-1558409605.sql.gz'waiting for quorum...OK(re)generate node filesgenerate new node certificatemerge authorized SSH keys and known hostsgenerated new node certificate, restart pveproxy and pvedaemon servicessuccessfully added node 'proxmox2' to cluster.root@proxmox2:~#查看状态
root@proxmox2:~# pvecm statusQuorum information------------------Date: Tue May 21 11:40:31 2019Quorum provider: corosync_votequorumNodes: 2Node ID: 0x00000002Ring ID: 1/28Quorate: YesVotequorum information----------------------Expected votes: 2Highest expected: 2Total votes: 2Quorum: 2 Flags: Quorate Membership information---------------------- Nodeid Votes Name0x00000001 1 192.168.108.2000x00000002 1 192.168.108.201 (local)root@proxmox2:~#查看节点
root@proxmox2:~# pvecm nodesMembership information---------------------- Nodeid Votes Name 1 1 192.168.108.200 2 1 192.168.108.201 (local)root@proxmox2:~#选择集群,选择加入信息
选择拷贝信息
登录节点界面,选择加入集群
将信息复制入信息栏,并输入集群密码
正在加入集群
添加成功
查看集群界面
喜欢请关注微信公众号-运维少年