License: Attribution-NonCommercial-ShareAlike 4.0 International
本文出自 Suzf Blog。 如未注明,均为 SUZF.NET 原创。
在debian 8 使用的过程中 发现 zfs 无法加载
# uname -r 4.x.x-0.bpo.1-amd64 # modprobe zfs modprobe: FATAL: Module zfs not found.
相关的软件包已经安装了
$ dpkg -l | grep zfs ii debian-zfs 7~jessie amd64 Native ZFS filesystem metapackage for Debian. ii libzfs2 0.6.5.7-8-jessie amd64 Native ZFS filesystem library for Linux ii zfs-dkms 0.6.5.7-8-jessie all Native ZFS filesystem kernel modules for Linux ii zfsonlinux 8 all archive.zfsonlinux.org trust package ii zfsutils 0.6.5.7-8-jessie amd64 command-line tools to manage ZFS filesystems
x 是一个正整数
获得注册的模块的版本号
$ dkms status spl, 0.6.5.x, 3.x.0-4-amd64, x86_64: installed zfs, 0.6.5.x, 3.x.0-4-amd64, x86_64: installed
尝试手工编译模块
# dkms remove -m zfs -v 0.6.5.x --all # dkms remove -m spl -v 0.6.5.x --all # dkms add -m spl -v 0.6.5.x # dkms add -m zfs -v 0.6.5.x # dkms install -m spl -v 0.6.5.x # dkms install -m zfs -v 0.6.5.x
If you get the same error, then reinstall the headers package:
# apt-get install --reinstall linux-headers-$(uname -r)
重新加载
$ sudo modprobe zfs $ lsmod | grep zfs zfs 2793472 1 zunicode 331776 1 zfs zcommon 53248 1 zfs znvpair 90112 2 zfs,zcommon spl 102400 3 zfs,zcommon,znvpair zavl 16384 1 zfs $ dkms status spl, 0.6.5.x, 3.x.0-4-amd64, x86_64: installed spl, 0.6.5.x, 4.x.0-0.bpo.1-amd64, x86_64: installed zfs, 0.6.5.x, 3.x.0-4-amd64, x86_64: installed zfs, 0.6.5.x, 4.x.0-0.bpo.1-amd64, x86_64: installed
Reference
[1] https://github.com/zfsonlinux/zfs/issues/1155