部署Ceph客户端是为了实现客户端与Ceph集群之间的存储访问,使得用户或应用程序能够从Ceph存储集群中读写数据。本小节介绍了如何容器化部署客户端。
1 2 3 |
podman load -i ceph_release.tar podman tag [IMAGE_ID] localhost/ceph_release:v17.2.7 podman run --name client1 --hostname client1 --privileged --net=host --ipc=host -dti localhost/ceph_release:v17.2.7 /usr/sbin/init |
[IMAGE_ID]需要替换为真实的镜像ID,可通过podman images命令查看。
1 2 3 |
mkdir -p /etc/ceph scp -r ceph1:/etc/ceph/ceph.conf /etc/ceph/ scp -r ceph1:/etc/ceph/ceph.client.admin.keyring /etc/ceph/ |
1
|
ms_async_ucx_device = mlx5_xxx:1 # mlx5_xxx 为show_gids中的设备 |
ms_async_ucx_device中的设备名称可填写多个网络设备。该字段选中的设备(一个或多个)需要同时包含该客户端节点配置的管理IP地址和公共网络IP地址。
ms_async_ucx_event_polling = false ms_async_op_threads = 5 librados_thread_count = 3
1 2 3 |
podman exec client1 mkdir -p /etc/ceph podman cp /etc/ceph/ceph.conf client1:/etc/ceph/ podman cp /etc/ceph/ceph.client.admin.keyring client1:/etc/ceph/ |
1
|
ceph osd pool set ${pool_name} pg_autoscale_mode off |
1 2 |
podman exec -it client1 /bin/bash ceph -s |