Ceph FS 挂载

Cephfs使用挂载方式有两种 1.使用linux kernel挂载 mount 2.使用ceph-fuse挂载。

1.下图为mount挂载

mount -t ceph 10.110.180.112:6789:/ /mnt/ceph-ceshi-rbd2/ -o name=admin,secret=AQBYqRBcbCfoCxAA0aBmuyhm31MC0XVjEfd97Q==

挂载FS 的语法命令是:原生挂载方法

Mount -t ceph <ceph_mon_IP>:<mon_port>:/ <挂载路径> -o name=admin, secret=<ceph.client.admin.keyring>

安全的挂载方式 ,避免密钥泄漏 将密钥echo 到一个文件中挂载

Echo "AQBYqRBcbCfoCxAA0aBmuyhm31MC0XVjEfd97Q==" > /etc/ceph/adminkey

mount -t ceph 10.110.180.112:6789:/ /mnt/ceph-ceshi-rbd2/ -o name=admin,secretfile=/etc/ceph/adminkey

2.下图为ceph-fuse挂载

   

3.如果需要自动挂载,在配置文件添加一下即可。添加到/etc/fstab 文件中。

4.如果需要取消挂载cephfs umount即可。

posted @ 2019-09-06 16:00  still_j  阅读(3364)  评论(0编辑  收藏  举报