7.2. 配置 ceph-immutable-object-cache 守护进程
ceph-immutable-object-cache
是 Ceph 集群内的 RADOS 对象对象缓存的守护进程。
要使用 ceph-immutable-object-cache
守护进程,您必须能够连接 RADOS 集群。
守护进程将对象提升到本地目录。这些缓存对象服务将来会读取。您可以通过安装 ceph-immutable-object-cache
软件包来配置守护进程。
先决条件
- 一个正在运行的 Red Hat Ceph Storage 集群。
- 至少一个 SSD 用于缓存。
流程
启用 RBD 共享只读父镜像缓存。在
/etc/ceph/ceph.conf
文件的[client]
部分添加以下参数:示例
[root@ceph-host01 ~]# vi /etc/ceph/ceph.conf [client] rbd parent cache enabled = true rbd plugins = parent_cache
重启集群。
安装
ceph-immutable-object-cache
软件包:示例
[root@ceph-host1 ~]# dnf install ceph-immutable-object-cache
创建唯一的 Ceph 用户 ID,密钥环:
语法
ceph auth get-or-create client.ceph-immutable-object-cache.USER_NAME mon 'profile rbd' osd 'profile rbd-read-only'
示例
[root@ceph-host1 ~]# ceph auth get-or-create client.ceph-immutable-object-cache.user mon 'profile rbd' osd 'profile rbd-read-only' [client.ceph-immutable-object-cache.user] key = AQCVPH1gFgHRAhAAp8ExRIsoxQK4QSYSRoVJLw==
复制此密钥环。
在
/etc/ceph
目录中,创建一个文件并粘贴密钥环:示例
[root@ceph-host1 ]# vi /etc/ceph/ceph.client.ceph-immutable-object-cache.user.keyring [client.ceph-immutable-object-cache.user] key = AQCVPH1gFgHRAhAAp8ExRIsoxQK4QSYSRoVJLw
启用守护进程:
语法
systemctl enable ceph-immutable-object-cache@ceph-immutable-object-cache.USER_NAME
将 USER_NAME 指定为守护进程实例。
示例
[root@ceph-host1 ~]# systemctl enable ceph-immutable-object-cache@ceph-immutable-object-cache.user Created symlink /etc/systemd/system/ceph-immutable-object-cache.target.wants/ceph-immutable-object-cache@ceph-immutable-object-cache.user.service
/usr/lib/systemd/system/ceph-immutable-object-cache@.service. 启动
ceph-immutable-object-cache
守护进程:语法
systemctl start ceph-immutable-object-cache@ceph-immutable-object-cache.USER_NAME
示例
[root@ceph-host1 ~]# systemctl start ceph-immutable-object-cache@ceph-immutable-object-cache.user
验证
检查配置的状态:
语法
systemctl status ceph-immutable-object-cache@ceph-immutable-object-cache.USER_NAME
示例
[root@ceph-host1 ~]# systemctl status ceph-immutable-object-cache@ceph-immutable-object-cache.user ● ceph-immutable-object-cache@ceph-immutable-object-cache.user> Loaded: loaded (/usr/lib/systemd/system/ceph-immutable-objec> Active: active (running) since Mon 2021-04-19 13:49:06 IST; > Main PID: 85020 (ceph-immutable-) Tasks: 15 (limit: 49451) Memory: 8.3M CGroup: /system.slice/system-ceph\x2dimmutable\x2dobject\x2d> └─85020 /usr/bin/ceph-immutable-object-cache -f --cl>