Module ceph not found解决办法

问题

有可能你在进行 Ceph 文件系统挂载的时候出现下面的提示:

modprobe: FATAL: Module ceph not found.

mount.ceph: modprobe failed, exit status 1

mount error: ceph filesystem not supported by the system

这个是因为你的内核当中没有cephfs的相关模块,这个 centos6 下面比较常见,因为 centos6 的内核是 2.6.32,这个版本的内核中还没有集成cephfs的内核模块,而在 centos7 默认内核 3.10中已经默认集成了这个模块,我们看下集成的模块是怎样的显示

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[root@lab8106 ~]# uname -a
Linux ciserver 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@lab8106 ~]# modinfo ceph
filename: /lib/modules/3.10.0-229.el7.x86_64/kernel/fs/ceph/ceph.ko
license: GPL
description: Ceph filesystem for Linux
author: Patience Warnick <patience@newdream.net>
author: Yehuda Sadeh <yehuda@hq.newdream.net>
author: Sage Weil <sage@newdream.net>
alias: fs-ceph
rhelversion: 7.1
srcversion: 2086D500AFAF47B7260E08A
depends: libceph
intree: Y
vermagic: 3.10.0-229.el7.x86_64 SMP mod_unload modversions
signer: CentOS Linux kernel signing key
sig_key: A6:2A:0E:1D:6A:6E:48:4E:9B:FD:73:68:AF:34:08:10:48:E5:35:E5
sig_hashalgo: sha256

可以从上面的输出可以看到有个路径为 /lib/modules/3.10.0-229.el7.x86_64/kernel/fs/ceph/ceph.ko 的内核模块,这个就是 cephfs 客户端需要使用到的模块

解决办法

解决这个缺失的模块的办法就是升级内核,并且在编译内核的时候需要选上这个模块,在某些商用的 Ceph 里面都是默认把这个模块给屏蔽了,这是因为 Cephfs 并没有达到稳定的标准,而这个在后端版本升级到 10.2 版本(jewel)版本,才正式宣布为第一个稳定版本,当然这个还是慎用为好,除非有比较强大的技术力量支撑,否则也不会出现那么多的大的商用厂家也不开放 Cephfs

总结

Cephfs这块是比rbd和radosgw这两个部分都复杂的部分,而真正能控制住这个开发的目前主要是 Intel 的 zhengyan,从邮件列表里面可以看到主要都是他在修bug,这一块未知的可能性太多,任何小的故障抖动都可能是致命的

变更记录

Why Who When
创建 武汉-运维-磨渣 2016-07-24