cephFS的配置
部署好ceph后,配置ceph MDS
su - ceph -s /bin/bash
id=$(hostname)
mkdir -p /var/lib/ceph/mds/ceph-${id}
exit
id=$(hostname)
ceph auth get-or-create mds.${id} mon 'profile mds' mgr 'profile mds' mds 'allow *' osd 'allow *' > /var/lib/ceph/mds/ceph-${id}/keyring
systemctl start ceph-mds@${id}
配置cephFS
ceph fs volume create cephfs01
ceph fs status cephfs01 #查到状态正常则cephFS完成
cephFS配置完成后,客户端需要像使用nfs一样来使用,我们去另外一台机器安装客户端
dnf install centos-release-ceph-nautilus -y
dnf install ceph-fuse ceph-common -y
从ceph节点把配置文件和kering拷贝过去
scp /etc/ceph/ceph.conf ${client_ip}:/etc/ceph/ceph.conf
scp /etc/ceph/ceph.client.admin.keyring ${client_ip}:/etc/ceph/ceph.client.admin.keyring
去客户端节点进行配置,并进行挂载测试
ceph-authtool -p /etc/ceph/ceph.client.admin.keyring > admin.key
chmod 600 admin.key
mount -t ceph ${ceph_ip}:6789:/ /mnt -o name=admin,secretfile=admin.key
df -h #看到挂载成功则完成