ZFS 模块未加载

ZFS 模块未加载

请有人解释一下如何修复这个问题,这让我抓狂了。我真的很想让 ZFS 工作。我正在运行 64 位操作系统,但它是 arm

root@amlogic:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

root@amlogic:~# zfs list
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.

root@amlogic:~# uname -a
Linux amlogic 3.14.29 #11 SMP PREEMPT Sat Jul 1 21:28:33 MSK 2017 aarch64 aarch64 aarch64 GNU/Linux

root@amlogic:~# /sbin/modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/3.14.29

root@amlogic:~# sudo apt install zfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zfsutils-linux' instead of 'zfs'
zfsutils-linux is already the newest version (0.6.5.6-0ubuntu17).

删除 zfs 和 zfsutils-linux 然后重新安装后

root@amlogic:~# apt install zfsutils-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libzfs2linux
Suggested packages:
  samba-common-bin nfs-kernel-server zfs-initramfs
Recommended packages:
  zfs-dkms zfs-zed
The following NEW packages will be installed:
  libzfs2linux zfsutils-linux
0 upgraded, 2 newly installed, 0 to remove and 13 not upgraded.
Need to get 344 kB of archives.
After this operation, 1,027 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com xenial-updates/main arm64 libzfs2linux arm64 0.6.5.6-0ubuntu17 [86.7 kB]
Get:2 http://ports.ubuntu.com xenial-updates/main arm64 zfsutils-linux arm64 0.6.5.6-0ubuntu17 [257 kB]
Fetched 344 kB in 2s (123 kB/s)
Selecting previously unselected package libzfs2linux.
(Reading database ... 163857 files and directories currently installed.)
Preparing to unpack .../libzfs2linux_0.6.5.6-0ubuntu17_arm64.deb ...
Unpacking libzfs2linux (0.6.5.6-0ubuntu17) ...
Selecting previously unselected package zfsutils-linux.
Preparing to unpack .../zfsutils-linux_0.6.5.6-0ubuntu17_arm64.deb ...
Unpacking zfsutils-linux (0.6.5.6-0ubuntu17) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
ln: failed to create hard link '/boot/initrd.img-3.14.29.dpkg-bak' => '/boot/initrd.img-3.14.29': Operation not permitted
update-initramfs: Generating /boot/initrd.img-3.14.29
update-initramfs: Converting to u-boot format
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libzfs2linux (0.6.5.6-0ubuntu17) ...
Setting up zfsutils-linux (0.6.5.6-0ubuntu17) ...
zfs-import-cache.service is a disabled or a static unit, not starting it.
zfs-import-scan.service is a disabled or a static unit, not starting it.
zfs-mount.service is a disabled or a static unit, not starting it.
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
ln: failed to create hard link '/boot/initrd.img-3.14.29.dpkg-bak' => '/boot/initrd.img-3.14.29': Operation not permitted
update-initramfs: Generating /boot/initrd.img-3.14.29
update-initramfs: Converting to u-boot format

...当我运行时仍然存在同样的问题zfs list

答案1

有时这有助于我构建模块:

sudo apt install zfs-dkms
sudo modprobe zfs

sudo zfs list

这需要当前内核的构建必需品和头文件可用。请注意自定义构建内核的一些问题。

它在我的 x64 笔记本电脑上运行过多次,有时也在 ARM 平台的 Raspberry Pi 上运行过。

此外,您可能需要将模块获取到 initramfs,但那是另一个话题。

相关内容