4.10. 启用应用程序
RHCS 3 及更新的版本为池提供了额外的保护,以防止未授权类型的客户端将数据写入池。这意味着,系统管理员必须明确使池能够从 Ceph 块设备、Ceph 对象网关、Ceph 文件系统或自定义应用程序接收 I/O 操作。
要让客户端应用程序对池执行 I/O 操作,请执行以下操作:
[root@host ~]# ceph osd pool application enable <poolname> <app> {--yes-i-really-mean-it}
其中 <app> 是:
-
用于 Ceph文件系统的 CephFS. -
RBD用于 Ceph 块设备 -
rgw用于 Ceph 对象网关
注意
为自定义应用程序指定不同的 <app> 值。
重要
未启用的池将生成 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'"
]
}
- 备注
-
使用
rbd pool init <pool-name>为 Ceph 块设备初始化池。