首页 > 其他 > 详细

ceph运维-对象存储

时间:2020-12-02 14:26:55      阅读:67      评论:0      收藏:0      [点我收藏+]

一 摘要

二 环境信息

三 对象存储运维

(一)对象存储部署

对象存储部署到三台server 节点上。

3.1.1 三台集群节点部署对象存储

3.1.1.1 下载离线安装包

[cephadmin@ceph001 cephcluster]$ sudo yum -y install --downloadonly --downloaddir=/home/cephadmin/software/cephradosgw/ ceph-radosgw

3.1.1.2 安装(三台sever 节点都需要安装)

经检查我这边三台节点都安装过了

检查是否安装

[root@ceph003 ~]# rpm -qa | grep ceph-ra
ceph-radosgw-14.2.15-0.el7.x86_64
[root@ceph003 ~]#


安装命令

[cephadmin@ceph001 cephcluster]$ sudo yum -y install ceph-radosgw

3.1.1.2 部署(ceph-deploy 部署)

在部署节点执行

[cephadmin@ceph001 cephcluster]$ pwd
/home/cephadmin/cephcluster
[cephadmin@ceph001 cephcluster]$ ceph-deploy rgw create ceph001 ceph002 ceph003
[ceph_deploy.conf][DEBUG ] found configuration file at: /home/cephadmin/.cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (2.0.1): /bin/ceph-deploy rgw create ceph001 ceph002 ceph003
[ceph_deploy.cli][INFO  ] ceph-deploy options:
[ceph_deploy.cli][INFO  ]  username                      : None
[ceph_deploy.cli][INFO  ]  verbose                       : False
[ceph_deploy.cli][INFO  ]  rgw                           : [(‘ceph001‘, ‘rgw.ceph001‘), (‘ceph002‘, ‘rgw.ceph002‘), (‘ceph003‘, ‘rgw.ceph003‘)]
[ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[ceph_deploy.cli][INFO  ]  subcommand                    : create
[ceph_deploy.cli][INFO  ]  quiet                         : False
[ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f21975ec290>
[ceph_deploy.cli][INFO  ]  cluster                       : ceph
[ceph_deploy.cli][INFO  ]  func                          : <function rgw at 0x7f2197ea6f50>
[ceph_deploy.cli][INFO  ]  ceph_conf                     : None
[ceph_deploy.cli][INFO  ]  default_release               : False
[ceph_deploy.rgw][DEBUG ] Deploying rgw, cluster ceph hosts ceph001:rgw.ceph001 ceph002:rgw.ceph002 ceph003:rgw.ceph003

默认端口是7480

我这里启动失败了,而且/etc/ceph/ceph.conf 文件权限被改为root 了。

[root@ceph002 ceph]# ll
total 12
-rw------- 1 cephadmin cephadmin 151 Nov 30 17:25 ceph.client.admin.keyring
-rw-r--r-- 1 root      root      313 Dec  2 10:23 ceph.conf
-rw-r--r-- 1 cephadmin cephadmin  92 Nov 24 03:33 rbdmap
-rw------- 1 cephadmin cephadmin   0 Nov 30 17:16 tmp4_tYYV
[root@ceph002 ceph]# pwd
/etc/ceph
[root@ceph002 ceph]#



查看/var/log/message 日志

Dec  2 10:53:19 ceph001 radosgw: failed to fetch mon config (--no-mon-config to skip)
Dec  2 10:53:19 ceph001 systemd: ceph-radosgw@rgw.service: main process exited, code=exited, status=1/FAILURE
Dec  2 10:53:19 ceph001 systemd: Unit ceph-radosgw@rgw.service entered failed state.
Dec  2 10:53:19 ceph001 systemd: ceph-radosgw@rgw.service failed.
Dec  2 10:53:19 ceph001 systemd: ceph-radosgw@rgw.service holdoff time over, scheduling restart.
Dec  2 10:53:19 ceph001 systemd: Stopped Ceph rados gateway.
Dec  2 10:53:19 ceph001 systemd: Started Ceph rados gateway.
Dec  2 10:53:19 ceph001 radosgw: 2020-12-02 10:53:19.753 7f77a49fd900 -1 auth: unable to find a keyring on /var/lib/ceph/radosgw/ceph-rgw/keyring: (2) No such file or directory
Dec  2 10:53:19 ceph001 radosgw: 2020-12-02 10:53:19.753 7f77a49fd900 -1 AuthRegistry(0x558033c28138) no keyring found at /var/lib/ceph/radosgw/ceph-rgw/keyring, disabling cephx
Dec  2 10:53:19 ceph001 radosgw: 2020-12-02 10:53:19.754 7f77a49fd900 -1 auth: unable to find a keyring on /var/lib/ceph/radosgw/ceph-rgw/keyring: (2) No such file or directory
Dec  2 10:53:19 ceph001 radosgw: 2020-12-02 10:53:19.754 7f77a49fd900 -1 AuthRegistry(0x7fffa3d30168) no keyring found at /var/lib/ceph/radosgw/ceph-rgw/keyring, disabling cephx
Dec  2 10:53:19 ceph001 radosgw: failed to fetch mon config (--no-mon-config to skip)

发现我三个节点:
/var/lib/ceph/radosgw/ 该目录权限都是root.

[root@ceph001 lib]# cd ceph/
[root@ceph001 ceph]# ll
total 0
drwxr-x--- 2 ceph ceph 26 Dec  1 14:16 bootstrap-mds
drwxr-x--- 2 ceph ceph 26 Nov 30 17:46 bootstrap-mgr
drwxr-x--- 2 ceph ceph 26 Nov 30 17:38 bootstrap-osd
drwxr-x--- 2 ceph ceph  6 Nov 24 03:33 bootstrap-rbd
drwxr-x--- 2 ceph ceph  6 Nov 24 03:33 bootstrap-rbd-mirror
drwxr-x--- 2 ceph ceph 26 Dec  2 10:23 bootstrap-rgw
drwxr-x--- 3 ceph ceph 20 Dec  2 10:54 crash
drwxr-x--- 3 ceph ceph 26 Dec  1 14:16 mds
drwxr-x--- 3 ceph ceph 26 Nov 30 17:46 mgr
drwxr-x--- 3 ceph ceph 26 Nov 30 17:16 mon
drwxr-x--- 3 ceph ceph 20 Nov 30 17:38 osd
drwxr-xr-x 3 root root 30 Dec  2 10:23 radosgw
drwxr-x--- 2 ceph ceph  6 Nov 30 17:16 tmp
[root@ceph001 ceph]# cd radosgw/
[root@ceph001 radosgw]# ll
total 0
drwxr-xr-x 2 root root 48 Dec  2 10:23 ceph-rgw.ceph001
[root@ceph001 radosgw]# cd ceph-rgw.ceph001/
[root@ceph001 ceph-rgw.ceph001]# ll
total 4
-rw-r--r-- 1 root root  0 Dec  2 10:47 done
-rw-r--r-- 1 root root 69 Dec  2 10:47 keyring
-rw-r--r-- 1 root root  0 Dec  2 10:47 systemd
[root@ceph001 ceph-rgw.ceph001]# pwd
/var/lib/ceph/radosgw/ceph-rgw.ceph001

修改权限三台节点上都修改权限:

[root@ceph003 ~]# chown cephadmin:cephadmin /etc/ceph/ceph.conf
[root@ceph003 ~]#  chown -R ceph:ceph /var/lib/ceph/radosgw/
[root@ceph003 ~]#


再次手工启动

[cephadmin@ceph001 cephcluster]$ sudo systemctl restart ceph-radosgw@rgw.ceph001.service
[cephadmin@ceph001 cephcluster]$ sudo systemctl status ceph-radosgw@rgw.ceph001.service


报另外一个错

Dec  2 11:08:15 ceph001 radosgw: 12: (__libc_start_main()+0xf5) [0x7ff5f40a03d5]
Dec  2 11:08:15 ceph001 radosgw: 13: (()+0x2bed71) [0x557668cadd71]
Dec  2 11:08:15 ceph001 radosgw: NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Dec  2 11:08:15 ceph001 radosgw: -3> 2020-12-02 11:08:15.913 7ff601a8c900 -1 ERROR: failed to initialize watch: (34) Numerical result out of range
Dec  2 11:08:15 ceph001 radosgw: 0> 2020-12-02 11:08:15.917 7ff601a8c900 -1 *** Caught signal (Segmentation fault) **
Dec  2 11:08:15 ceph001 radosgw: in thread 7ff601a8c900 thread_name:radosgw
Dec  2 11:08:15 ceph001 radosgw: ceph version 14.2.15 (afdd217ae5fb1ed3f60e16bd62357ca58cc650e5) nautilus (stable)

ceph运维-对象存储

原文:https://www.cnblogs.com/weiwei2021/p/14073315.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!