fuse挂载Ceph磁盘

本文主要记录在centos 7上面如何通过fuse挂载ceph磁盘到本地。

CentOS7(测试于CentOS 7.3.1611)

  1. 把Ceph加入yum仓库(/etc/yum.repos.d/ceph.repo)并执行yum makecache更新元数据
[Ceph]
name=Ceph packages for $basearch
baseurl=https://download.ceph.com/rpm-luminous/el7/$basearch
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
priority=2

[Ceph-noarch]
name=Ceph noarch packages
baseurl=https://download.ceph.com/rpm-luminous/el7/noarch
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
priority=2

[ceph-source]
name=Ceph source packages
baseurl=https://download.ceph.com/rpm-luminous/el7/SRPMS
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
priority=2
  1. 检查ceph-fuse版本号
    如果出现版本号为0.8或者之类版本很低的情况时可以安装yum-plugin-priorities
[root@centos ~]# yum info ceph-fuse
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: anorien.csc.warwick.ac.uk
 * extras: www.mirrorservice.org
 * updates: mirror.ox.ac.uk
可安装的软件包
名称    :ceph-fuse
架构    :x86_64
时期       :2
版本    :12.2.8
发布    :0.el7
大小    :2.5 M
源    :Ceph/x86_64
简介    : Ceph fuse-based client
网址    :http://ceph.com/
协议    : LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
描述    : FUSE based client for Ceph distributed network file system
  1. 安装ceph-fuse并挂载ceph-fuse磁盘
    安装直接 yum install ceph-fuse就好了。
    挂载ceph时记得添加keyring,我本机添加的是/etc/ceph/ceph.client.admin.keyring
[client.admin]
    key = xxxxxxxxxxxxxxx

然后通过ceph-fuse挂载:

ceph-fuse -m 172.16.90.95:6789 /mnt/ceph

你可能感兴趣的:(fuse挂载Ceph磁盘)