添加 '存储/ceph/p版本安装/7-添加ceph节点.md'
This commit is contained in:
parent
71cd9f1a2a
commit
a5a79a9da1
1 changed files with 37 additions and 0 deletions
37
存储/ceph/p版本安装/7-添加ceph节点.md
Normal file
37
存储/ceph/p版本安装/7-添加ceph节点.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
> 将ceph镜像导出到其他ceph节点上
|
||||||
|
```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上导入镜像
|
||||||
|
# docker load -i ceph-images.tar
|
||||||
|
```
|
||||||
|
>
|
||||||
|
> 将ceph.pub公钥拷贝到其他ceph节点
|
||||||
|
```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将主机添加到存储集群中,执行添加节点命令后,会在目标节点拉到ceph/node-exporter镜像,需要一定时间,所以可提前在节点上将镜像导入。
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
> 查看加入到集群的节点
|
||||||
|
```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
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue