首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我的新Ceph集群状态从来不显示“HEALTH_OK”?

为什么我的新Ceph集群状态从来不显示“HEALTH_OK”?
EN

Stack Overflow用户
提问于 2018-09-17 07:04:25
回答 3查看 1.7K关注 0票数 2

我正在用Docker和image 'ceph/daemon:v3.1.0-stable-3.1-luminous-centos-7'.建立一个Ceph集群但是,在设置了集群之后,ceph status命令永远不会到达HEALTH_OK。这是我的集群信息。它有足够的磁盘空间和网络是正常的。

我的问题是:

  1. 为什么卡夫不复制“尺寸过小”的页面?
  2. 怎么修呢?

非常感谢!

代码语言:javascript
复制
➜  ~ ceph -s
  cluster:
    id:     483a61c4-d3c7-424d-b96b-311d2c6eb69b
    health: HEALTH_WARN
            Degraded data redundancy: 3 pgs undersized

  services:
    mon:        3 daemons, quorum pc-10-10-0-13,pc-10-10-0-89,pc-10-10-0-160
    mgr:        pc-10-10-0-89(active), standbys: pc-10-10-0-13, pc-10-10-0-160
    mds:        cephfs-1/1/1 up  {0=pc-10-10-0-160=up:active}, 2 up:standby
    osd:        5 osds: 5 up, 5 in
    rbd-mirror: 3 daemons active
    rgw:        3 daemons active

  data:
    pools:   6 pools, 68 pgs
    objects: 212 objects, 5.27KiB
    usage:   5.02GiB used, 12.7TiB / 12.7TiB avail
    pgs:     65 active+clean
             3  active+undersized

➜  ~ ceph osd tree
ID CLASS WEIGHT   TYPE NAME               STATUS REWEIGHT PRI-AFF
-1       12.73497 root default
-5        0.90959     host pc-10-10-0-13
 3   hdd  0.90959         osd.3               up  1.00000 1.00000
-7        0.90959     host pc-10-10-0-160
 4   hdd  0.90959         osd.4               up  1.00000 1.00000
-3       10.91579     host pc-10-10-0-89
 0   hdd  3.63860         osd.0               up  1.00000 1.00000
 1   hdd  3.63860         osd.1               up  1.00000 1.00000
 2   hdd  3.63860         osd.2               up  1.00000 1.00000
➜  ~ ceph osd pool ls detail
pool 1 'cephfs_data' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 24 flags hashpspool stripe_width 0 application cephfs
pool 2 'cephfs_metadata' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 24 flags hashpspool stripe_width 0 application cephfs
pool 3 '.rgw.root' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 13 pgp_num 13 last_change 27 flags hashpspool stripe_width 0 application rgw
pool 4 'default.rgw.control' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 13 pgp_num 13 last_change 30 flags hashpspool stripe_width 0 application rgw
pool 5 'default.rgw.meta' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 13 pgp_num 13 last_change 32 owner 18446744073709551615 flags hashpspool stripe_width 0 application rgw
pool 6 'default.rgw.log' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 13 pgp_num 13 last_change 34 flags hashpspool stripe_width 0 application rgw
EN

回答 3

Stack Overflow用户

发布于 2018-10-02 14:04:35

@itsafire --这不是解决办法。他要求的是解决方案,而不是硬件推荐。

我运行8个节点和5个节点多个CEPH集群。我总是使用带有多个压缩映射的2个副本(用于SSD、SAS和72k驱动器)

如果使用资源有限的小型集群,为什么需要3个副本?

你能解释一下为什么我的解决方案会导致灾难吗?你的名声很好,我不知道你是怎么得到的。也许只是回复推荐而不是解决方案。

票数 2
EN

Stack Overflow用户

发布于 2018-09-19 20:55:09

创建一个大小为2和Min大小为1的新池。

对于pg-num,使用Ceph计算器https://ceph.com/pgcalc/

票数 1
EN

Stack Overflow用户

发布于 2018-09-17 12:17:15

您似乎创建了一个具有不同osd配置和大小的三个节点集群。标准的挤压规则告诉C年会在不同的主机上有3张PG的副本。如果没有足够的空间将PG分散到三个主机上,那么您的集群就永远不会健康。

从一组大小相等的主机(RAM、CPU、OSD)开始总是一个好主意。

讨论大小为2vs3的集群的更新

不要使用两个副本。Ceph最初的大小默认值为2,但在Ceph0.82(萤火虫版本)中,这个值被更改为3。

为什么?因为如果一个驱动器发生故障,则只剩下一个包含数据的驱动器。如果这个驱动器在恢复运行时也失败了,那么您的数据就会永远消失。

请参阅此线程位于C年会用户邮件列表上。

无论集群有多大或多小,复制都不安全。随着磁盘变得更大,恢复时间将增加。在那个窗口中,您不想在一个副本上运行。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52362394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档