Using the ceph tell command

Another efficient way to change the runtime configuration for the Ceph daemon without the overhead of logging in to that node is to use the ceph tell command:

How to do it…

The ceph tell command saves you the effort of logging into the node where the daemon is running. This command goes through the monitor node, so you can execute it from any node in the cluster:

  1. To change the osd_recovery_threads setting from osd.0, execute the following:
    ceph tell osd.0 injectargs '--osd_recovery_threads=2'
    
  2. To change the same setting for all the OSDs across the cluster, execute the following:
    ceph tell osd.* injectargs '--osd_recovery_threads=2'
    
  3. You can also change multiple settings as a one liner:
    ceph tell osd.* injectargs '--osd_recovery_max_active=1 ...

Get Ceph Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.