第 14 章 Cephadm 操作


作为存储管理员,您可以在 Red Hat Ceph Storage 集群中执行 Cephadm 操作。

14.1. 监控 cephadm 日志消息

Cephadm 日志到 cephadm 集群日志频道,以便您可以实时监控进度。

  • 要实时监控进度,请运行以下命令:

    示例

    [ceph: root@host01 /]# ceph -W cephadm
    Copy to Clipboard Toggle word wrap

    示例

    2022-06-10T17:51:36.335728+0000 mgr.Ceph5-1.nqikfh [INF] refreshing Ceph5-adm facts
    2022-06-10T17:51:37.170982+0000 mgr.Ceph5-1.nqikfh [INF] deploying 1 monitor(s) instead of 2 so monitors may achieve consensus
    2022-06-10T17:51:37.173487+0000 mgr.Ceph5-1.nqikfh [ERR] It is NOT safe to stop ['mon.Ceph5-adm']: not enough monitors would be available (Ceph5-2) after stopping mons [Ceph5-adm]
    2022-06-10T17:51:37.174415+0000 mgr.Ceph5-1.nqikfh [INF] Checking pool "nfs-ganesha" exists for service nfs.foo
    2022-06-10T17:51:37.176389+0000 mgr.Ceph5-1.nqikfh [ERR] Failed to apply nfs.foo spec NFSServiceSpec({'placement': PlacementSpec(count=1), 'service_type': 'nfs', 'service_id': 'foo', 'unmanaged': False, 'preview_only': False, 'pool': 'nfs-ganesha', 'namespace': 'nfs-ns'}): Cannot find pool "nfs-ganesha" for service nfs.foo
    Traceback (most recent call last):
      File "/usr/share/ceph/mgr/cephadm/serve.py", line 408, in _apply_all_services
        if self._apply_service(spec):
      File "/usr/share/ceph/mgr/cephadm/serve.py", line 509, in _apply_service
        config_func(spec)
      File "/usr/share/ceph/mgr/cephadm/services/nfs.py", line 23, in config
        self.mgr._check_pool_exists(spec.pool, spec.service_name())
      File "/usr/share/ceph/mgr/cephadm/module.py", line 1840, in _check_pool_exists
        raise OrchestratorError(f'Cannot find pool "{pool}" for '
    orchestrator._interface.OrchestratorError: Cannot find pool "nfs-ganesha" for service nfs.foo
    2022-06-10T17:51:37.179658+0000 mgr.Ceph5-1.nqikfh [INF] Found osd claims -> {}
    2022-06-10T17:51:37.180116+0000 mgr.Ceph5-1.nqikfh [INF] Found osd claims for drivegroup all-available-devices -> {}
    2022-06-10T17:51:37.182138+0000 mgr.Ceph5-1.nqikfh [INF] Applying all-available-devices on host Ceph5-adm...
    2022-06-10T17:51:37.182987+0000 mgr.Ceph5-1.nqikfh [INF] Applying all-available-devices on host Ceph5-1...
    2022-06-10T17:51:37.183395+0000 mgr.Ceph5-1.nqikfh [INF] Applying all-available-devices on host Ceph5-2...
    2022-06-10T17:51:43.373570+0000 mgr.Ceph5-1.nqikfh [INF] Reconfiguring node-exporter.Ceph5-1 (unknown last config time)...
    2022-06-10T17:51:43.373840+0000 mgr.Ceph5-1.nqikfh [INF] Reconfiguring daemon node-exporter.Ceph5-1 on Ceph5-1
    Copy to Clipboard Toggle word wrap

  • 默认情况下,日志会显示 info 级别的事件及以上。要查看调试级别信息,请运行以下命令:

    示例

    [ceph: root@host01 /]# ceph config set mgr mgr/cephadm/log_to_cluster_level debug
    [ceph: root@host01 /]# ceph -W cephadm --watch-debug
    [ceph: root@host01 /]# ceph -W cephadm --verbose
    Copy to Clipboard Toggle word wrap

  • 将调试级别恢复为默认 info

    示例

    [ceph: root@host01 /]# ceph config set mgr mgr/cephadm/log_to_cluster_level info
    Copy to Clipboard Toggle word wrap

  • 要查看最近的事件,请运行以下命令:

    示例

    [ceph: root@host01 /]# ceph log last cephadm
    Copy to Clipboard Toggle word wrap

这些事件也记录到监控器主机上的 ceph.cephadm.log 文件,以及 monitor 守护进程的 stderr

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat