winson 发表于 2019-2-1 14:49:59

ceontos 7.3 部署 ceph12.1.1

  ceontos 7.3 部署ceph12.1.1
  

  #http://docs.ceph.com/docs/master/start/quick-ceph-deploy/#create-a-cluster
  

  参考官方手册即可。
  

  碰到几个问题和一些优化的地方,记录如下:
  

  1、yum 源。 海外源特别慢,故使用163 yum。
  

  
  name=ceph
  baseurl=http://mirrors.163.com/ceph/rpm-luminous/el7/x86_64/
  gpgcheck=0
  
  name=cephnoarch
  baseurl=http://mirrors.163.com/ceph/rpm-luminous/el7/noarch/
  gpgcheck=0
  

  

  2、新增了 mgr 节点。新特性介绍:
  http://blog.csdn.net/xiaqunfeng123/article/details/73850342
  

  3、ceph存储引擎默认使用bluestore。 故osd节点只能使用裸设备部署。 由于之前均是使用挂载点的目录进行的osd部署,此次部署的时候,使用目录和分好区的盘符来创建osd,最后发现始终单个osd 就提供10G空间,ceph-deploy 也没有任何报错。 需要重点关注。
  

  4、手动安装ceph软件:
  yum -y install ceph ceph-release ceph-common ceph-radosgwceph-fuse
  由于使用ceph-deployinstall 不能正常安装。我们机器使用的是http代理。   故只能手动处理。
  

  

  5、
  报错处理:
  #############################################
  $ ceph -w
  2017-03-24 18:58:29.832395 7fb5d6222700 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
  2017-03-24 18:58:29.832414 7fb5d6222700 -1 monclient(hunting): ERROR: missing keyring, cannot use cephx for authentication
  2017-03-24 18:58:29.832417 7fb5d62227000 librados: client.admin initialization error (2) No such file or directory
  Error connecting to cluster: ObjectNotFound
  $
  

  权限问题,修改为sudo chmod 755 /etc/ceph/ceph.client.admin.keyring
  

  

  

  安装不过去的时候:
  yum -y install epel-release
  

  

  

  # ** ERROR: osd init failed: (36) File name too long
  

  修改?/etc/ceph/ceph.conf文件,在文件中添加如下配置
  

  osd max object name len = 256
  osd max object namespace len = 64
  

  

  

  

  #安装ceph时出错 RuntimeError: NoSectionError: No section: 'ceph',是为什么呢
  yum remove ceph-release先执行这个,把这个东西卸了,应该是这个的版本不兼容 亲测有效
  

  

  

  ################3
  clock skew detected on mon.cephnode3
  在admin结点上,修改ceph.conf,添加:
  mon_clock_drift_allowed = 5
  mon_clock_drift_warn_backoff = 30
  ceph-deploy --overwrite-conf admin ceph1 ceph2 ceph3
  

  重启monitor
  systemctl restart ceph-mon@ceph1.service
  

  

  osd进程过多,需要修改ceph用户的最大文件打开数:
  /etc/security/limits.d/20-nproc.conf
  




页: [1]
查看完整版本: ceontos 7.3 部署 ceph12.1.1