Ceph fs MDS 状态报错的解决办法

错误状态信息

[root@node-10 /]# ceph fs status

Error EINVAL: Traceback (most recent call last):

  File "/usr/share/ceph/mgr/mgr_module.py", line 974, in _handle_command

    return self.handle_command(inbuf, cmd)

  File "/usr/share/ceph/mgr/status/module.py", line 251, in handle_command

    return self.handle_fs_status(cmd)

  File "/usr/share/ceph/mgr/status/module.py", line 176, in handle_fs_status

    mds_versions[metadata.get('ceph_version', "unknown")].append(standby['name'])

AttributeError: 'NoneType' object has no attribute 'get'

配置 mds_cache_memory_limit

[root@node-10 /]# ceph daemon mds.node-10 config show |grep mds_cache

    "mds_cache_memory_limit": "1073741824",

    "mds_cache_mid": "0.700000",

    "mds_cache_release_free_interval": "10",

    "mds_cache_reservation": "0.050000",

    "mds_cache_size": "0",

    "mds_cache_trim_decay_rate": "1.000000",

    "mds_cache_trim_interval": "1",

    "mds_cache_trim_threshold": "65536",

[root@node-10 /]#

 

默认 1G,若要配置为 5G,可以修改文件 /etc/ceph/ceph.conf ,添加

 

[mds]

mds cache memory limit = 5368709120

 

Tips:不合理的 cache 设置,会出现问题: 1 MDSs report oversized cache

解决方法

查看 MDS 元数据信息 ceph mds metadata,发现有信息不全的节点,在该节点重启 MDS 服务即可恢复

 

[root@node-10 /]# ceph mds metadata

 

 

重启 MDS 服务

 

[root@node-10 /]# systemctl restart ceph-mds@node-10.service

[root@node-11 /]# systemctl restart ceph-mds@node-11.service

[root@node-12 /]# systemctl restart ceph-mds@node-12.service

 

检查ceph fs status 状态

 

 

[root@node-10 /]# ceph fs status

cephfs - 1 clients

======

+------+--------+---------+---------------+-------+-------+

| Rank | State  |   MDS   |    Activity   |  dns  |  inos |

+------+--------+---------+---------------+-------+-------+

|  0   | active | node-10 | Reqs:    0 /s |   33  |   15  |

+------+--------+---------+---------------+-------+-------+

+-----------------+----------+-------+-------+

|       Pool      |   type   |  used | avail |

+-----------------+----------+-------+-------+

| cephfs_metadata | metadata | 2116k | 30.4G |

|   cephfs_data   |   data   |  384k | 30.4G |

+-----------------+----------+-------+-------+

+-------------+

| Standby MDS |

+-------------+

|   node-11   |

|   node-12   |

+-------------+

MDS version: ceph version 14.2.9 (581f22da52345dba46ee232b73b990f06029a2a0) nautilus (stable)

[root@node-10 /]#

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值