6-添加ceph節(jié)點

視頻鏈接:添加ceph節(jié)點
> 將ceph鏡像導(dǎo)出到其他ceph節(jié)點上
```shell
# docker images ?|grep -v "REPOSITORY" |awk '{print $1":"$2}' |xargs docker save -o ceph-images.tar
# for i in {2..5};do scp ceph-images.tar ceph0$i:/root/;done
## 在ceph02-05上導(dǎo)入鏡像
# docker load -i ceph-images.tar
```
>
> 將ceph.pub公鑰拷貝到其他ceph節(jié)點
```shell
# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph02
# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph03
# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph04
# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph05
## 也可以用以下命令拷貝,在ceph01上操作
# for i in {2..5};do ssh-copy-id -f -i /etc/ceph/ceph.pub ceph0$i;done
```
> 使用cephadm將主機(jī)添加到存儲集群中,執(zhí)行添加節(jié)點命令后,會在目標(biāo)節(jié)點拉到ceph/node-exporter鏡像,需要一定時間,所以可提前在節(jié)點上將鏡像導(dǎo)入。
```shell
# cephadm shell ceph orch host add ceph02 192.168.59.242 --labels=mon,mgr
# ceph orch host add ceph03 192.168.59.243 --labels=mon
# ceph orch host add ceph04 192.168.59.244
# ceph orch host add ceph05 192.168.59.245
```
> 查看加入到集群的節(jié)點
```shell
# ceph orch host ls
HOST ? ?ADDR ? ? ? ? ? ?LABELS ? STATUS ?
ceph01 ?192.168.59.241 ?_admin ? ? ? ? ?
ceph02 ?192.168.59.242 ?mon mgr ? ? ? ? ?
ceph03 ?192.168.59.243 ?mon ? ? ? ? ? ? ?
ceph04 ?192.168.59.244 ? ? ? ? ? ? ? ? ?
ceph05 ?192.168.59.245 ? ? ? ? ? ? ? ? ?
5 hosts in cluster
```