挂载Ceph文件系统以及Ceph存储三副本特性展示

创建文件系统

ceph fs volume create cephfs

 

挂载 CephFS 的常规先决条件

为客户端主机生成最小的 conf 文件并将其放在标准位置:

mkdir -p -m 755 /etc/ceph
ssh {user}@{mon-host} "sudo ceph config generate-minimal-conf" | sudo tee /etc/ceph/ceph.conf

确保conf具有适当的权限:

chmod 644 /etc/ceph/ceph.conf

创建 CephX 用户并获取其密钥:

ssh {user}@{mon-host} "sudo ceph fs authorize cephfs client.foo / rw" | sudo tee /etc/ceph/ceph.client.foo.keyring

确保密钥环具有适当的权限:

chmod 600 /etc/ceph/ceph.client.foo.keyring

创建挂载点:

mkdir /mnt/ceph

安装 ceph-fuse

 apt install ceph-fuse

使用ceph-fuse挂载

ceph-fuse -n client.foo /mnt/ceph

 

posted @ 2024-08-06 19:06  dachenyi  阅读(5)  评论(0编辑  收藏  举报