1. 运行daemon时使用新的参数值覆盖配置文件的值.
ceph tell {daemon-type}.{id or *} injectargs --{name} {value} [--{name} {value}]
例子 :
ceph tell osd.0 injectargs --debug-osd 20 --debug-ms 1
带空格的参数名使用_或-代替空格.
daemon-type 包括 mon, osd, mds .
* 表示所有类型的daemon.
Ceph allows you to make changes to the configuration of a ceph-osd, ceph-mon, or ceph-mds daemon at runtime. This capability is quite useful for increasing/decreasing logging output, enabling/disabling debug settings, and even for runtime optimization. The following reflects runtime configuration usage:
ceph tell {daemon-type}.{id or *} injectargs --{name} {value} [--{name} {value}]
Replace {daemon-type} with one of osd, mon or mds. You may apply the runtime setting to all daemons of a particular type with *, or specify a specific daemon’s ID (i.e., its number or letter). For example, to increase debug logging for a ceph-osd daemon named osd.0, execute the following:
ceph tell osd.0 injectargs --debug-osd 20 --debug-ms 1
In your ceph.conf file, you may use spaces when specifying a setting name. When specifying a setting name on the command line, ensure that you use an underscore or hyphen (_ or -) between terms (e.g., debug osd becomes --debug-osd).
2. 查看正在运行的daemon的启动参数.
ceph --admin-daemon {/path/to/admin/socket} config show
The default path for the admin socket for each daemon is:
/var/run/ceph/$cluster-$name.asok
例如 :
ceph --admin-daemon /var/run/ceph/ceph-osd.0.asok config show
3. 在同主机运行多个ceph存储集群.
配置文件名来区分集群名.
例如
ceph.conf 集群名为ceph.
openstack.conf, 集群名为openstack.
跑多个存储集群的话, 各自的集群有各自的daemon. (如mon, osd, mds)
另外需要注意一些配置不能冲突, 例如 :
keyring
admin socket
log file
pid file
mon data
mon cluster log file
osd data
osd journal
mds data
rgw data
监听端口
如果要跑多集群, 建议存储上完全隔离, 例如集群A使用A盘, 集群B使用B盘.
最后, 配置不同的集群名时, 需要使用-c指定集群.
ceph -c {cluster-name}.conf health
ceph -c openstack.conf health
[参考]
1. http://ceph.com/docs/master/rados/configuration/ceph-conf/
2. http://blog.163.com/digoal@126/blog/static/16387704020141182109300/
3. http://blog.163.com/digoal@126/blog/static/1638770402014118103927428/
时间: 2024-09-21 06:35:47