云計算
集群創(chuàng)建(任意節(jié)點)1.1 命令行創(chuàng)建集群
創(chuàng)建集群
上個教程也創(chuàng)建了集群,如果創(chuàng)建了這里就不需要創(chuàng)建了。
root@shaonian:~#?pvecmcreate?yunwei-cluster
corosync?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.conf
restart?corosync?and?cluster?filesystem
root@shaonian:~#?
查看集群狀態(tài)
root@shaonian:~#?pvecm?status
quorum?information
------------------
date:?mon?may?20?16:23:08?2019
quorum?provider:corosync_votequorum
nodes:1
node?id:0x00000001
ring?id:1/8
quorate:yes
votequorum?information
----------------------
expected?votes:?1
highest?expected:?1
total?votes:1
quorum:?1
flags:quorate?
membership?information
----------------------
nodeidvotes?name
0x000000011?192.168.108.200?(local)
root@shaonian:~#?
查看集群節(jié)點
root@shaonian:~#?pvecm?nodes
membership?information
----------------------
nodeidvotes?name
?11?192.168.108.200?(local)
root@shaonian:~#?
1.2 節(jié)點加入集群
登錄到其余節(jié)點
ip為創(chuàng)建集群的節(jié)點ip
root@proxmox2:~#?pvecm?add?192.168.108.200
please?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)yes
login?succeeded.
request?addition?of?this?node
join?request?ok,?finishing?setup?locally
stopping?pve-cluster?service
backup?old?database?to?\\\'/var/lib/pve-cluster/backup/config-1558409605.sql.gz\\\'
waiting?for?quorum...ok
(re)generate?node?files
generate?new?node?certificate
merge?authorized?ssh?keys?and?known?hosts
generated?new?node?certificate,?restart?pveproxy?and?pvedaemon?services
successfully?added?node?\\\'proxmox2\\\'?to?cluster.
root@proxmox2:~#?
查看狀態(tài)
root@proxmox2:~#?pvecm?status
quorum?information
------------------
date:?tue?may?21?11:40:31?2019
quorum?provider:corosync_votequorum
nodes:2
node?id:0x00000002
ring?id:1/28
quorate:yes
votequorum?information
----------------------
expected?votes:?2
highest?expected:?2
total?votes:2
quorum:?2
flags:quorate?
membership?information
----------------------
nodeidvotes?name
0x000000011?192.168.108.200
0x000000021?192.168.108.201?(local)
root@proxmox2:~#?
查看節(jié)點
root@proxmox2:~#?pvecm?nodes
membership?information
----------------------
nodeidvotes?name
?11?192.168.108.200
?21?192.168.108.201?(local)
root@proxmox2:~#?
1.3 web界面添加節(jié)點加入集群
選擇集群,選擇加入信息
選擇拷貝信息
登錄節(jié)點界面,選擇加入集群
將信息復制入信息欄,并輸入集群密碼
正在加入集群
添加成功
查看集群界面
喜歡請關注微信公眾號-運維少年