无法将 ZFS 添加到 17.10

无法将 ZFS 添加到 17.10

我正在尝试在联想笔记本电脑的 17.10 版本上安装 ZFS,但 zfs 模块未加载。我怀疑这可能是因为我使用了不同的内核来解决我之前遇到的 BIOS 损坏问题。以下是相关命令的摘录:

root@kigelia:~# apt install zfsutils-linux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.13.0-32 linux-headers-4.13.0-32-generic linux-image-4.13.0-32-generic linux-image-extra-4.13.0-32-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed
Suggested packages:
  nfs-kernel-server samba-common-bin zfs-initramfs | zfs-dracut
The following NEW packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed zfsutils-linux
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 957 kB of archives.
After this operation, 3,286 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 libuutil1linux amd64 0.6.5.11-1ubuntu3.1 [46.3 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 libnvpair1linux amd64 0.6.5.11-1ubuntu3.1 [35.2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 libzpool2linux amd64 0.6.5.11-1ubuntu3.1 [387 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 libzfs2linux amd64 0.6.5.11-1ubuntu3.1 [119 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 zfsutils-linux amd64 0.6.5.11-1ubuntu3.1 [329 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 zfs-zed amd64 0.6.5.11-1ubuntu3.1 [41.2 kB]
Fetched 957 kB in 0s (2,026 kB/s)  
Selecting previously unselected package libuutil1linux.
(Reading database ... 332030 files and directories currently installed.)
Preparing to unpack .../0-libuutil1linux_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking libuutil1linux (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package libnvpair1linux.
Preparing to unpack .../1-libnvpair1linux_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking libnvpair1linux (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package libzpool2linux.
Preparing to unpack .../2-libzpool2linux_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking libzpool2linux (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package libzfs2linux.
Preparing to unpack .../3-libzfs2linux_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking libzfs2linux (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package zfsutils-linux.
Preparing to unpack .../4-zfsutils-linux_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking zfsutils-linux (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package zfs-zed.
Preparing to unpack .../5-zfs-zed_0.6.5.11-1ubuntu3.1_amd64.deb ...
Unpacking zfs-zed (0.6.5.11-1ubuntu3.1) ...
Setting up libuutil1linux (0.6.5.11-1ubuntu3.1) ...
Setting up libnvpair1linux (0.6.5.11-1ubuntu3.1) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libzpool2linux (0.6.5.11-1ubuntu3.1) ...
Setting up libzfs2linux (0.6.5.11-1ubuntu3.1) ...
Setting up zfsutils-linux (0.6.5.11-1ubuntu3.1) ...
Created symlink /etc/systemd/system/zfs-mount.service.wants/zfs-import-cache.service → /lib/systemd/system/zfs-import-cache.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-import-cache.service → /lib/systemd/system/zfs-import-cache.service.
Created symlink /etc/systemd/system/zfs-share.service.wants/zfs-mount.service → /lib/systemd/system/zfs-mount.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-mount.service → /lib/systemd/system/zfs-mount.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-share.service → /lib/systemd/system/zfs-share.service.
Created symlink /etc/systemd/system/multi-user.target.wants/zfs.target → /lib/systemd/system/zfs.target.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-import-cache.service failed because the control process exited with error code.
See "systemctl  status zfs-import-cache.service" and "journalctl  -xe" for details.
Job for zfs-mount.service failed because the control process exited with error code.
See "systemctl  status zfs-mount.service" and "journalctl  -xe" for details.
Job for zfs-share.service failed because the control process exited with error code.
See "systemctl  status zfs-share.service" and "journalctl  -xe" for details.
Setting up zfs-zed (0.6.5.11-1ubuntu3.1) ...
Created symlink /etc/systemd/system/zed.service → /lib/systemd/system/zfs-zed.service.
Created symlink /etc/systemd/system/zfs.target.wants/zfs-zed.service → /lib/systemd/system/zfs-zed.service.
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
root@kigelia:~# zpool create -f tank -O compression=lz4 -m /test /dev/disk/by-id/wwn-0x5002538d40dca5d9-part11
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
root@kigelia:~# /sbin/modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.15.3-041503-generic
root@kigelia:~#

这是内核和可用模块。

hbarta@kigelia:~$ uname -a
Linux kigelia 4.15.3-041503-generic #201802120730 SMP Mon Feb 12 07:31:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
hbarta@kigelia:~$ find /lib/modules -name "*zfs*"
/lib/modules/4.13.0-32-generic/kernel/zfs
/lib/modules/4.13.0-32-generic/kernel/zfs/zfs
/lib/modules/4.13.0-32-generic/kernel/zfs/zfs/zfs.ko
/lib/modules/4.13.0-21-generic/kernel/zfs
/lib/modules/4.13.0-21-generic/kernel/zfs/zfs
/lib/modules/4.13.0-21-generic/kernel/zfs/zfs/zfs.ko
/lib/modules/4.13.0-36-generic/kernel/zfs
/lib/modules/4.13.0-36-generic/kernel/zfs/zfs
/lib/modules/4.13.0-36-generic/kernel/zfs/zfs/zfs.ko
hbarta@kigelia:~$ 

我是否应该切换回主流内核?针对特殊内核提交错误报告?向正在运行的内核添加模块?

我很感激关于最佳行动方案的建议(以及如何正确执行此操作的指示说明)。

谢谢!

编辑 0:我在这台笔记本电脑上启动了 Debian Stretch 并执行了相同的步骤。我注意到 ZFS 实用程序的安装包括“zfs-dkms”,它不是 Ubuntu 的依赖项。然后我启动了 Ubuntu 并尝试安装此包。该过程报告了一些错误,然后挂起。从终端窗口抓取的是

hbarta@kigelia:~$ sudo apt install zfs-dkms
[sudo] password for hbarta: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.13.0-32 linux-headers-4.13.0-32-generic linux-image-4.13.0-32-generic linux-image-extra-4.13.0-32-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  spl spl-dkms
The following NEW packages will be installed:
  spl spl-dkms zfs-dkms
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,486 kB of archives.
After this operation, 11.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 spl-dkms all 0.6.5.11-1ubuntu1 [385 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 zfs-dkms all 0.6.5.11-1ubuntu3.1 [1,081 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 spl amd64 0.6.5.11-1ubuntu1 [19.5 kB]
Fetched 1,486 kB in 0s (3,350 kB/s)
Preconfiguring packages ...
Selecting previously unselected package spl-dkms.
(Reading database ... 332214 files and directories currently installed.)
Preparing to unpack .../spl-dkms_0.6.5.11-1ubuntu1_all.deb ...
Unpacking spl-dkms (0.6.5.11-1ubuntu1) ...
Setting up spl-dkms (0.6.5.11-1ubuntu1) ...
Loading new spl-0.6.5.11 DKMS files...
Building for 4.15.3-041503-generic
Building initial module for 4.15.3-041503-generic
ERROR (dkms apport): kernel package linux-headers-4.15.3-041503-generic is not supported
Error! Bad return status for module build on kernel: 4.15.3-041503-generic (x86_64)
Consult /var/lib/dkms/spl/0.6.5.11/build/make.log for more information.
Selecting previously unselected package zfs-dkms.
(Reading database ... 332501 files and directories currently installed.)
Preparing to unpack .../zfs-dkms_0.6.5.11-1ubuntu3.1_all.deb ...
Unpacking zfs-dkms (0.6.5.11-1ubuntu3.1) ...
Selecting previously unselected package spl.
Preparing to unpack .../spl_0.6.5.11-1ubuntu1_amd64.deb ...
Unpacking spl (0.6.5.11-1ubuntu1) ...
Setting up spl (0.6.5.11-1ubuntu1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up zfs-dkms (0.6.5.11-1ubuntu3.1) ...
WARNING: Building ZFS module on an unknown kernel.
Loading new zfs-0.6.5.11 DKMS files...
Building for 4.15.3-041503-generic
Building initial module for 4.15.3-041503-generic
configure: error: 
    *** Please make sure the kmod spl devel <kernel> package for your
    *** distribution is installed then try again.  If that fails you
    *** can specify the location of the spl objects with the
    *** '--with-spl-obj=PATH' option.
ERROR (dkms apport): kernel package linux-headers-4.15.3-041503-generic is not supported
Error! Bad return status for module build on kernel: 4.15.3-041503-generic (x86_64)
Consult /var/lib/dkms/zfs/0.6.5.11/build/make.log for more information.
hbarta@kigelia:~$ find /lib/modules -name "*zfs*"
/lib/modules/4.13.0-32-generic/kernel/zfs
/lib/modules/4.13.0-32-generic/kernel/zfs/zfs
/lib/modules/4.13.0-32-generic/kernel/zfs/zfs/zfs.ko
/lib/modules/4.13.0-21-generic/kernel/zfs
/lib/modules/4.13.0-21-generic/kernel/zfs/zfs
/lib/modules/4.13.0-21-generic/kernel/zfs/zfs/zfs.ko
/lib/modules/4.13.0-36-generic/kernel/zfs
/lib/modules/4.13.0-36-generic/kernel/zfs/zfs
/lib/modules/4.13.0-36-generic/kernel/zfs/zfs/zfs.ko
hbarta@kigelia:~$ 

相关内容