飞牛安装 ZFS
飞牛安装ZFS 失败的原因
飞牛将 Linux 内核升级到了 6.12,导致在 apt install zfsutils-linux
执行时会报错,提示也很明显官方的 Debian 12 安装的是 zfs-2.1.11-1+deb12u1
只兼容到 Linux 6.2
。
Building initial module for 6.12.18-trim
configure: error:
*** None of the expected "file_fallocate" interfaces were detected.
*** This may be because your kernel version is newer than what is
*** supported, or you are using a patched custom kernel with
*** incompatible modifications.
***
*** ZFS Version: zfs-2.1.11-1+deb12u1
*** Compatible Kernels: 3.10 - 6.2
安装最新版的 ZFS 2.3.2
参考: https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html#installation
最终会安装成功 zfs 2.3.2
zfs-import-scan.service is a disabled or a static unit, not starting it.
Processing triggers for initramfs-tools (0.142+deb12u3) ...
update-initramfs: Generating /boot/initrd.img-6.12.18-trim
W: Possible missing firmware /lib/firmware/i915/bmg_dmc.bin for module i915
W: Possible missing firmware /lib/firmware/i915/xe2lpd_dmc.bin for module i915
Processing triggers for libc-bin (2.36-9+deb12u10) ...
ldconfig: /usr/local/lib/libzmq.so.5 is not a symbolic link
Processing triggers for man-db (2.11.2-2) ...
Setting up zfs-zed (2.3.2-2~bpo12+2) ...
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.
可喜可贺的是,这个版本还引入了史诗性的特性—— raidz_expansion
,终于支持向 RAIDZ 中新增磁盘了,不用 ZFS 的最后一个理由都不存在了。
OpenZFS RAID-Z Expansion: A New Era in Storage Flexibility | FreeBSD Foundation
后续
到这里其实已经可以把之前的 ZFS 存储池导入成功了,不过飞牛的存储管理里还是不能识别到,目前也只能是把 ZFS 存储池挂载到普通目录上,当成一个普通目录使用,虽然不太优雅,但至少之前的数据不需要重新导入了,想拆分池子可以直接通过命令行操作,也不太麻烦。