如果您想在生产高峰时间或非高峰时间添加新的 OSD 节点,并且希望与 Ceph 数据重新平衡相比对客户端 IO 的影响最小 - 由于新的 OSD 新的恢复和回填 IO。您可以借助以下命令来限制回填和恢复:
- Set osd_max_backfills = 1 option to throttle the backfill threads. You can add this in ceph.conf [osd] section and you can also set it dynamically with the following command:
- Set osd_recovery_max_active = 1 option to throttle the recovery threads. You can add this in ceph.conf [osd] section and you can also set it dynamically with the following command:
- Set osd_recovery_op_priority = 1 option to lower the recovery priority. You can add this in ceph.conf [osd] section and you can also set it dynamically with the following command:
在 Ceph 的 Jewel 版本中,当在 Jewel 上安装 Ceph 集群时,默认启用两个附加标志。如果集群是从 Jewel 之前的版本(例如 Hammer)升级而来的,则可以启用这些标志:
- sortbitwise: The sortbitwise flag indicates that objects are sorted in a bitwise fashion. The old sort order nibblewise, was an historical artifact of filestore that is simply inefficient with the current version of Ceph. Bitwise sort order makes operations that require listing objects, like backfill and scrubbing, a bit more efficient:
- require_jewel_osds: This flag prevents any pre-Jewel OSDs from joining the Ceph cluster. The purpose of this flag is to prevent an OSD from joining the cluster that will not support features that the Jewel code supports leading to possible OSD flapping and cluster issues:
设置
按位排序
flag 是一个破坏性的变化,因为每个 PG 都必须通过对等互连,并且每个客户端都必须重新发送 inflight 请求。设置此标志后集群中没有数据移动。另请注意,集群中的所有 OSD 必须在设置此标志之前运行 Jewel。
除了这些标志,你还可以使用以下命令修复OSD和PG:
- ceph osd repair: This performs repairing on a specified OSD.
- ceph pg repair: This performs repairing on a specified PG. Use this command with caution; based on your cluster state, this command can impact user data if not used carefully.
- ceph pg scrub: This performs scrubbing on a specified PG.
- ceph deep-scrub: This performs deep-scrubbing on specified PGs.
Ceph CLI 对于端到端集群管理非常强大。您可以在 http://docs.ceph.com/docs/master/ 获得更多信息rados/man/.
d 经理服务。每次您启动,重新启动,然后 stop Ceph 守护进程(或您的整个集群),您必须至少指定一个选项和一个命令。您还可以指定守护程序类型或守护程序实例。一般语法如下:
systemctl [选项...] 命令 [服务名称...]
systemctl 选项包括:
- --help or -h: Prints a short help text
- --all or -a: When listing units, show all loaded units, regardless of their state
- --signal or -s: When used will kill, choose which signal to send to the selected process
- --force or -f: When used with enable, overwrite any existing conflicting symlinks
- --host or -h: Execute an operation on a remote host
systemctl 命令包括以下内容:
- status: Shows status of the daemon
- start: Starts the daemon
- stop: Stops the daemon
- restart: Stops and then starts the daemon
- kill: Kills the specified daemon
- reload: Reloads the config file without interrupting pending operations
- list-units: List known units managed by systemd
- condrestart: Restarts if the service is already running
- enable: Turns the service on for the next boot or other triggering event
- disable: Turns the service off for the next boot or other triggering event
- is-enabled: Used to check whether a service is configured to start or not in the current environment
systemctl 可以针对以下 Ceph 服务类型:
-
- ceph-mon
- ceph-osd
- ceph-mds
- ceph-radosgw