Cepn檔案系統掛載使用詳解
阿新 • • 發佈:2020-11-02
把檔案系統掛載為使用者空間檔案系統
Debian/Ubuntu安裝軟體:
# apt-get -y install ceph-fuse ceph-common
準備叢集配置檔案和金鑰檔案:
/etc/ceph/ceph.client.admin.keyring
/etc/ceph/ceph.conf
掛載檔案系統:
# mkdir /home/cephfs
# ceph-fuse /home/cephfs
手動解除安裝檔案系統:
# fusermount -u /home/cephfs
把檔案系統掛載為核心驅動
在金鑰環檔案中找到與某使用者對應的金鑰,找到用於掛載Ceph檔案系統的使用者(這裡為admin),複製其金鑰部分:
$ cat /etc/ceph/ceph.client.admin.keyring
[client.admin]
key = <金鑰>
儲存叢集預設需要認證,所以掛載時需要指定使用者名稱和金鑰:
# mkdir /home/kernel_cephfs
# mount -t ceph <mon_ip>:6789:/ /home/kernel_cephfs -o name=admin,secret=<金鑰>
編輯/etc/fstab檔案,新增以下行實現開機掛載:
<mon_ip>:6789:/ /home/kernel_cephfs ceph name=admin,secret=<金鑰>,noatime,_netdev 0 2