Ceph admin socket

Ceph components are daemons and Unix-domain sockets. Ceph allows us to use these sockets to query its daemons. The Ceph admin socket is a powerful tool to get and set the Ceph daemon configurations at runtime. With this tool, changing the daemon configuration values becomes a lot easier, rather than changing the Ceph configuration file, which requires the daemon to restart.

To do this, you should log in to the node running the Ceph daemons and execute the ceph daemon commands.

How to do it…

There are two ways to access the admin socket:

  • Using the Ceph daemon name:
    $ sudo ceph daemon {daemon-name} {option}
    
  • Using the absolute path of the socket file; the default location is as follows: /var/run/ceph:
    $ sudo ceph daemon {absolute path to socket file} {option}
    

We will now try to access the Ceph daemon using the admin socket:

  1. List all the available admin socket commands for the OSD:
    # ceph daemon osd.0 help
    
  2. Similarly, list all the available socket commands for MON:
    # ceph daemon mon.ceph-node1 help
    
  3. Check the OSD configuration settings for osd.0:
    # ceph daemon osd.0 config show
    
  4. Check the MON configuration settings for mon.ceph-node1:
    # ceph daemon mon.ceph-node1 config show
    

    Note

    The Ceph admin daemon allows you to change the daemon configuration settings at runtime. However, these changes are temporary. To permanently change the Ceph daemon configuration, update the Ceph configuration file.

  5. To get the current config value for osd, use the _recover_max_chunk parameter for the osd.0 daemon:
    # ceph daemon osd.0 config get osd_recovery_max_chunk
    
  6. To change the osd_recovery_max_chunk value for osd.0, execute the following:
    # ceph daemon osd.0 config set osd_recovery_max_chunk 1000000 
    
    How to do it…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.189.199