Using the Ceph metavariables

Metavariables simplify Ceph storage cluster configuration dramatically. When a metavariable is set in a configuration value, Ceph expands the metavariable into a concrete value.

Metavariables are powerful when used within the [global], [osd], [mon], or [client] sections of the Ceph configuration file. However, you can also use them with the administration socket. Ceph metavariables are similar to Bash shell expansion.

Ceph supports the following metavariables, as listed in Table 1:
Table 1. Supported Ceph metavariables
Metavariable Description Example Default
$cluster Expands to the Ceph storage cluster name. Useful when running multiple Ceph storage clusters on the same hardware. /etc/ceph/$cluster.keyring ceph
$type Expands to one of osd or mon, depending on the type of instant daemon. /var/lib/ceph/$type None.
$id Expands to the daemon identifier. For osd.0, this would be 0. /var/lib/ceph/$type/$cluster-$id None.
$host Expands to the host name of the instant daemon. N/A None.
$name Expands to $type.$id. /var/run/ceph/$cluster-$name.asok None.