Ceph集群管理之概要与Mon

命令描述

ceph命令是一个工具集,用于手动部署和维护Ceph集群。其提供了各种命令集合,可以部署、维护或者管理MON、OSD、PG、MDS等组件。

另外,ceph命令时间上是一个Python脚本,该命令本质上是对librados动态库的封装。

命令摘要

ceph auth [ add | caps | del | export | get | get-key | get-or-create | get-or-create-key | import | list | print-key | print_key ] …

ceph compact

ceph config-key [ del | exists | get | list | put ] …

ceph df {detail}

ceph fs [ ls | new | reset | rm ] …

ceph fsid

ceph health {detail}

ceph heap [ dump | start_profiler | stop_profiler | release | stats ] …

ceph injectargs <injectedargs> [ … ]

ceph log <logtext> [ … ]

ceph mds [ add_data_pool | cluster_down | cluster_up | compat | deactivate | dump | fail | getmap | newfs | remove_data_pool | rm | rmfailed | set | set_max_mds | set_state | setmap | stat | stop | tell ] …

ceph mon [ add | dump | getmap | remove | stat ] …

ceph mon_status

ceph osd [ blacklist | blocked-by | create | deep-scrub | df | down | dump | erasure-code-profile | find | getcrushmap | getmap | getmaxosd | in | lspools | map | metadata | out | pause | perf | pg-temp | primary-affinity | primary-temp | repair | reweight | reweight-by-pg | rm | scrub | set | setcrushmap | setmaxosd  | stat | thrash | tree | unpause | unset ] …

 

ceph osd crush [ add | add-bucket | create-or-move | dump | get-tunable | link | move | remove | rename-bucket | reweight | reweight-all | reweight-subtree | rm | rule | set | set-tunable | show-tunables | tunables | unlink ] …

ceph osd pool [ create | delete | get | get-quota | ls | mksnap | rename | rmsnap | set | set-quota | stats ] …

ceph osd tier [ add | add-cache | cache-mode | remove | remove-overlay | set-overlay ] …

ceph pg [ debug | deep-scrub | dump | dump_json | dump_pools_json | dump_stuck | force_create_pg | getmap | ls | ls-by-osd | ls-by-pool | ls-by-primary | map | repair | scrub | send_pg_creates | set_full_ratio | set_nearfull_ratio | stat ] …

ceph quorum [ enter | exit ]

ceph quorum_status

ceph report { <tags> [ … ] }

ceph scrub

ceph status

ceph sync force {–yes-i-really-mean-it} {–i-know-what-i-am-doing}

ceph tell <name (type.id)> <args> […]

ceph version

监控进程管理(mon)

通过子命令的配合实现对MON的管理和配置。

add

在某个地址上新增一个名字为<name>的MON服务。

    示例:

ceph mon add <name> <IPaddr[:port]>

dump

显示特定版本的MON map的格式化的信息,该命令可以指定MON map的版本信息,具体示例如下,参数为epoch:

ceph mon dump {<int[0-]>}

ceph mon dump 1

getmap

获取特定版本的MON map信息,该命令回去的是二进制的信息,可以保持在某个文件中,具体格式如下:

ceph mon getmap {<int[0-]>}

示例:

ceph mon getmap 2 –o filename

remove

移除特定名称的MON服务节点。具体格式如下:

ceph mon remove <name>

示例:

    ceph mon remove osd3

stat

显示MON的摘要状态信息,具体格式如下:

ceph mon stat

mon_status

报告MON的状态,相对详细,具体格式如下:

     ceph mon_status

如果引用本站的原创文章,请注明原文链接:,本站保留追究责任的权利!