4.11. 启用应用程序
Red Hat Ceph Storage 为池提供额外的保护,以防止未经授权类型的客户端将数据写入池中。这意味着系统管理员必须表达池才能从 Ceph 块设备、Ceph 对象网关、Ceph Filesystem 或自定义应用程序接收 I/O 操作。
要启用客户端应用程序对池执行 I/O 操作,请运行以下命令:
语法
ceph osd pool application enable POOL_NAME APPLICATION {--yes-i-really-mean-it}
ceph osd pool application enable POOL_NAME APPLICATION {--yes-i-really-mean-it}
其中 APPLICATION
是:
-
cephfs
用于 Ceph 文件系统。 -
RBD
,用于 Ceph 块设备。 -
rgw
用于 Ceph 对象网关.
注意
为自定义应用程序指定不同的 APPLICATION
值。
重要
未启用的池将生成一个 HEALTH_WARN
状态。在这种情况下,ceph 健康详情 -f json-pretty
的输出将输出以下内容:
{ "checks": { "POOL_APP_NOT_ENABLED": { "severity": "HEALTH_WARN", "summary": { "message": "application not enabled on 1 pool(s)" }, "detail": [ { "message": "application not enabled on pool '<pool-name>'" }, { "message": "use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications." } ] } }, "status": "HEALTH_WARN", "overall_status": "HEALTH_WARN", "detail": [ "'ceph health' JSON format has changed in luminous. If you see this your monitoring system is scraping the wrong fields. Disable this with 'mon health preluminous compat warning = false'" ] }
{
"checks": {
"POOL_APP_NOT_ENABLED": {
"severity": "HEALTH_WARN",
"summary": {
"message": "application not enabled on 1 pool(s)"
},
"detail": [
{
"message": "application not enabled on pool '<pool-name>'"
},
{
"message": "use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications."
}
]
}
},
"status": "HEALTH_WARN",
"overall_status": "HEALTH_WARN",
"detail": [
"'ceph health' JSON format has changed in luminous. If you see this your monitoring system is scraping the wrong fields. Disable this with 'mon health preluminous compat warning = false'"
]
}
注意
使用 rbd pool init POOL_NAME
初始化 Ceph 块设备的池。