最近几天接触到了ceph,搭建的过程中也发现很多问题:
1、故障现象
1
2
3
4
5
6
7
8
9
10
11
12
|
# ceph -s
cluster e2ca994a-00c4-477f-9390-ea3f931c5062
health HEALTH_WARN
clock skew detected on mon.hz-01-ops-tc-ceph-04, mon.hz-01-ops-tc-ceph-02
Monitor clock skew detected
monmap e1: 3 mons at {hz-01-ops-tc-ceph-02=172.16.2.231:6789
/0
,hz-01-ops-tc-ceph-03=172.16.2.172:6789
/0
,hz-01-ops-tc-ceph-04=172.16.2.181:6789
/0
}
election epoch 6, quorum 0,1,2 hz-01-ops-tc-ceph-03,hz-01-ops-tc-ceph-04,hz-01-ops-tc-ceph-02
osdmap e19: 4 osds: 4 up, 4
in
flags sortbitwise,require_jewel_osds
pgmap v37: 64 pgs, 1 pools, 0 bytes data, 0 objects
135 MB used, 179 GB / 179 GB avail
64 active+clean
|
网上查资料有说ntp时间的问题,但我是在内部测试环境中进行的,不存在时间不同步的问题
2、处理过程
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# cd /my-cluster
# ls
ceph.bootstrap-mds.keyring ceph.bootstrap-osd.keyring ceph.client.admin.keyring ceph-deploy-ceph.log
ceph.bootstrap-mgr.keyring ceph.bootstrap-rgw.keyring ceph.conf ceph.mon.keyring
# vim ceph.conf
# 添加如下信息:
mon clock drift allowed = 2
mon clock drift warn backoff = 30
同步配置信息:
# ceph-deploy --overwrite-conf admin hz-01-ops-tc-ceph-01 hz-01-ops-tc-ceph-02 hz-01-ops-tc-ceph-03 hz-01-ops-tc-ceph-04
[ceph_deploy.conf][DEBUG ] found configuration
file
at:
/root/
.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.39):
/usr/bin/ceph-deploy
--overwrite-conf admin hz-01-ops-tc-ceph-01 hz-01-ops-tc-ceph-02 hz-01-ops-tc-ceph-03 hz-01-ops-tc-ceph-04
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] overwrite_conf : True
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0xccbc68>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] client : [
'hz-01-ops-tc-ceph-01'
,
'hz-01-ops-tc-ceph-02'
,
'hz-01-ops-tc-ceph-03'
,
'hz-01-ops-tc-ceph-04'
]
[ceph_deploy.cli][INFO ] func : <
function
admin at 0xbfa8c0>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to hz-01-ops-tc-ceph-01
[hz-01-ops-tc-ceph-01][DEBUG ] connected to host: hz-01-ops-tc-ceph-01
[hz-01-ops-tc-ceph-01][DEBUG ] detect platform information from remote host
[hz-01-ops-tc-ceph-01][DEBUG ] detect machine
type
[hz-01-ops-tc-ceph-01][DEBUG ] write cluster configuration to
/etc/ceph/
{cluster}.conf
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to hz-01-ops-tc-ceph-02
[hz-01-ops-tc-ceph-02][DEBUG ] connected to host: hz-01-ops-tc-ceph-02
[hz-01-ops-tc-ceph-02][DEBUG ] detect platform information from remote host
[hz-01-ops-tc-ceph-02][DEBUG ] detect machine
type
[hz-01-ops-tc-ceph-02][DEBUG ] write cluster configuration to
/etc/ceph/
{cluster}.conf
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to hz-01-ops-tc-ceph-03
[hz-01-ops-tc-ceph-03][DEBUG ] connected to host: hz-01-ops-tc-ceph-03
[hz-01-ops-tc-ceph-03][DEBUG ] detect platform information from remote host
[hz-01-ops-tc-ceph-03][DEBUG ] detect machine
type
[hz-01-ops-tc-ceph-03][DEBUG ] write cluster configuration to
/etc/ceph/
{cluster}.conf
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to hz-01-ops-tc-ceph-04
[hz-01-ops-tc-ceph-04][DEBUG ] connected to host: hz-01-ops-tc-ceph-04
[hz-01-ops-tc-ceph-04][DEBUG ] detect platform information from remote host
[hz-01-ops-tc-ceph-04][DEBUG ] detect machine
type
[hz-01-ops-tc-ceph-04][DEBUG ] write cluster configuration to
/etc/ceph/
{cluster}.conf
|
到此,问题解决
本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/2060584,如需转载请自行联系原作者