ceph12版本部署实践

部署踩了一些坑,这里暂且不记录部署的过程,主要是一些坑

1、pip安装问题

我这里是在centos7.9系统,内核4.18上安装,执行了yum install python-pip之后默认下载的也是python2版本的pip,版本是8.x,但是使用pip安装软件时会提示升级到21版本,实际上python2.7不支持pip的21版本,安装的时候总是报错(说实话执行也用过是ok的,但现在不行了,一直报错),比如我就执行了下面的命令,实际上没有一个是成功的

pip install --upgrade pip
pip install --upgrade pip -i https://pypi.douban.com/simple
python -m pip install -i https://pypi.douban.com/simple --upgrade --force pip

按照网上的方法尝试没一个好的,后来求助了谷歌,才得到了21版本不支持python2.7的问题,珍爱生命,远离百度!!!
解决方法,升级到20版本,步骤如下所示:

wget https://files.pythonhosted.org/packages/0b/f5/be8e741434a4bf4ce5dbc235aa28ed0666178ea8986ddc10d035023744e6/pip-20.2.4.tar.gz
tar xf pip-20.2.4.tar.gz
cd pip-20.2.4
python setup.py install

成功解决,这个版本足够安装软件了

2、ceph-deploy报错remoto.connection.needs_ssh

实际上我这里出现这个问题是因为源的问题,我没有加上阿里云的ceph源,只有阿里云的base和epel源,这是不行的

cat >/etc/yum.repos.d/ceph.repo<<eof
[Ceph-SRPMS]
name=Ceph SRPMS packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-jewel/el7/SRPMS/
enabled=1
gpgcheck=0
type=rpm-md
 
[Ceph-aarch64]
name=Ceph aarch64 packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-jewel/el7/aarch64/
enabled=1
gpgcheck=0
type=rpm-md
 
[Ceph-noarch]
name=Ceph noarch packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-jewel/el7/noarch/
enabled=1
gpgcheck=0
type=rpm-md
 
[Ceph-x86_64]
name=Ceph x86_64 packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-jewel/el7/x86_64/
enabled=1
gpgcheck=0
type=rpm-md
eof

这里顺便把ceph的源放在这里,供后面使用。
此时卸载掉之前的ceph-deploy,重新再次安装,执行即可,就没有报错了。

[root@master my-cluster]# ceph-deploy new ceph-node1 ceph-node2 ceph-node3
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (1.5.39): /usr/bin/ceph-deploy new ceph-node1 ceph-node2 ceph-node3
[ceph_deploy.cli][INFO  ] ceph-deploy options:
[ceph_deploy.cli][INFO  ]  username                      : None
[ceph_deploy.cli][INFO  ]  func                          : <function new at 0x7fbdd6bfb668>
[ceph_deploy.cli][INFO  ]  verbose                       : False
[ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[ceph_deploy.cli][INFO  ]  quiet                         : False
[ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7fbdd6377488>
[ceph_deploy.cli][INFO  ]  cluster                       : ceph
[ceph_deploy.cli][INFO  ]  ssh_copykey                   : True
[ceph_deploy.cli][INFO  ]  mon                           : ['ceph-node1', 'ceph-node2', 'ceph-node3']
[ceph_deploy.cli][INFO  ]  public_network                : None
[ceph_deploy.cli][INFO  ]  ceph_conf                     : None
[ceph_deploy.cli][INFO  ]  cluster_network               : None
[ceph_deploy.cli][INFO  ]  default_release               : False
[ceph_deploy.cli][INFO  ]  fsid                          : None
[ceph_deploy.new][DEBUG ] Creating new cluster named ceph
[ceph_deploy.new][INFO  ] making sure passwordless SSH succeeds
[ceph-node1][DEBUG ] connected to host: master 
[ceph-node1][INFO  ] Running command: ssh -CT -o BatchMode=yes ceph-node1
[ceph-node1][DEBUG ] connected to host: ceph-node1 
[ceph-node1][DEBUG ] detect platform information from remote host
[ceph-node1][DEBUG ] detect machine type
[ceph-node1][DEBUG ] find the location of an executable
[ceph-node1][INFO  ] Running command: /usr/sbin/ip link show
[ceph-node1][INFO  ] Running command: /usr/sbin/ip addr show
[ceph-node1][DEBUG ] IP addresses found: [u'192.168.50.128']
[ceph_deploy.new][DEBUG ] Resolving host ceph-node1
[ceph_deploy.new][DEBUG ] Monitor ceph-node1 at 192.168.50.128
[ceph_deploy.new][INFO  ] making sure passwordless SSH succeeds
[ceph-node2][DEBUG ] connected to host: master 
[ceph-node2][INFO  ] Running command: ssh -CT -o BatchMode=yes ceph-node2
[ceph-node2][DEBUG ] connected to host: ceph-node2 
[ceph-node2][DEBUG ] detect platform information from remote host
[ceph-node2][DEBUG ] detect machine type
[ceph-node2][DEBUG ] find the location of an executable
[ceph-node2][INFO  ] Running command: /usr/sbin/ip link show
[ceph-node2][INFO  ] Running command: /usr/sbin/ip addr show
[ceph-node2][DEBUG ] IP addresses found: [u'192.168.50.131']
[ceph_deploy.new][DEBUG ] Resolving host ceph-node2
[ceph_deploy.new][DEBUG ] Monitor ceph-node2 at 192.168.50.131
[ceph_deploy.new][INFO  ] making sure passwordless SSH succeeds
[ceph-node3][DEBUG ] connected to host: master 
[ceph-node3][INFO  ] Running command: ssh -CT -o BatchMode=yes ceph-node3
[ceph-node3][DEBUG ] connected to host: ceph-node3 
[ceph-node3][DEBUG ] detect platform information from remote host
[ceph-node3][DEBUG ] detect machine type
[ceph-node3][DEBUG ] find the location of an executable
[ceph-node3][INFO  ] Running command: /usr/sbin/ip link show
[ceph-node3][INFO  ] Running command: /usr/sbin/ip addr show
[ceph-node3][DEBUG ] IP addresses found: [u'192.168.50.132']
[ceph_deploy.new][DEBUG ] Resolving host ceph-node3
[ceph_deploy.new][DEBUG ] Monitor ceph-node3 at 192.168.50.132
[ceph_deploy.new][DEBUG ] Monitor initial members are ['ceph-node1', 'ceph-node2', 'ceph-node3']
[ceph_deploy.new][DEBUG ] Monitor addrs are ['192.168.50.128', '192.168.50.131', '192.168.50.132']
[ceph_deploy.new][DEBUG ] Creating a random mon key...
[ceph_deploy.new][DEBUG ] Writing monitor keyring to ceph.mon.keyring...
[ceph_deploy.new][DEBUG ] Writing initial config to ceph.conf...

很不错。如果还是报错,请更换ceph的版本。

posted @ 2021-09-01 23:58  峰哥ge  阅读(271)  评论(0编辑  收藏  举报