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即可。