Configuration database
The Ceph Monitor manages a configuration database of Ceph options that centralize configuration management by storing configuration options for the entire storage cluster. By centralizing the Ceph configuration in a database, this simplifies storage cluster administration.
-
Compiled-in default values
-
Ceph cluster configuration database
-
Local ceph.conf file
-
Runtime override, using the ceph daemon DAEMON-NAME config set or ceph tell DAEMON-NAME injectargs commands
There are still a few Ceph options that can be defined in the local Ceph configuration file, which is /etc/ceph/ceph.conf by default.
cephadm uses a basic ceph.conf file that only contains a
minimal set of options for connecting to Ceph Monitors, authenticating, and fetching configuration
information. In most cases, cephadm uses only the mon_host option.
To avoid using ceph.conf only for the mon_host option, use DNS
SRV records to perform operations with Monitors.Sections and masks
Just as you can configure Ceph options globally, per daemon type, or by a specific daemon in the Ceph configuration file, you can also configure the Ceph options in the configuration database according to these sections. These sections are described in Table 1.
| Section | Description |
|---|---|
global
|
Affects all daemons and clients. |
mon
|
Affects all Ceph Monitors. |
mgr
|
Affects all Ceph Managers. |
osd
|
Affects all Ceph OSDs. |
mds
|
Affects all Ceph Metadata Servers. |
client
|
Affects all Ceph Clients, including mounted file systems, block devices, and RADOS Gateways. |
Ceph configuration options can have a mask associated with them. These masks can further restrict which daemons or clients the options apply to.
type:location-
The
typeis a CRUSH property, for example,rackorhost. Thelocationis a value for the property type. For example,host:foolimits the option only to daemons or clients running on thefoohost.For example:ceph config set osd/host:magna045 debug_osd 20 class:device-class-
The
device-classis the name of the CRUSH device class, such ashddorssd. For example,class:ssdlimits the option only to Ceph OSDs backed by solid state drives (SSD). This mask has no effect on non-OSD daemons of clients.For example:ceph config set osd/class:hdd osd_max_backfills 8
Administrative commands
The Ceph configuration database can be administered with the subcommand ceph config ACTION. These are the actions you can do:
-
ls -
Lists the available configuration options.
-
dump -
Dumps the entire configuration database of options for the storage cluster.
-
get WHO -
Dumps the configuration for a specific daemon or client. For example, WHO can be a daemon, like
mds.a. -
set WHO OPTION VALUE -
Sets a configuration option in the Ceph configuration database, where WHO is the target daemon, OPTION is the option to set, and VALUE is the desired value.
-
show WHO -
Shows the reported running configuration for a running daemon. These options might be different from those stored by the Ceph Monitors if there is a local configuration file in use or options have been overridden on the command line or at run time. Also, the source of the option values is reported as part of the output.
-
assimilate-conf -i INPUT_FILE -o OUTPUT_FILE -
Assimilate a configuration file from the INPUT_FILE and move any valid options into the Ceph Monitors’ configuration database. Any options that are unrecognized, invalid, or cannot be controlled by the Ceph Monitor return in an abbreviated configuration file stored in the OUTPUT_FILE. This command can be useful for transitioning from legacy configuration files to a centralized configuration database. Note that when you assimilate a configuration and the Monitors or other daemons have different configuration values set for the same set of options, the end result depends on the order in which the files are assimilated.
-
help OPTION -f json-pretty -
Displays help for a particular OPTION using a JSON-formatted output.
For more information, see Setting a specific configuration at runtime.