How to install ZFS support on Arch linux. This will install support using "zfs-dkms", instead of "zfs-linux" and "zfs-linux", which have been neglected lately. Sometimes they compile, sometimes they don't. The DKMS works fine for now.
1) Update the system if needed:
sudo pacman -Suy
2) Check that there's no support yet for ZFS:
sudo zpool import
The ZFS modules cannot be auto-loaded.
Try running 'modprobe zfs' as root to manually load them.
sudo modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/6.9.7-arch1-1
3) Uninstall all "zfs-linux*" packages first (you may be required to remove them automatically later if they conflict with "zfs-dkms"):
sudo pacman -Rdd $(pacman -Q | grep '^zfs-linux' | awk '{print $1}' | tr '\n' ' ')
4) Install required packages:
sudo pacman -S git base-devel linux-headers dkms
warning: git-2.45.2-1 is up to date -- reinstalling
warning: base-devel-1-3 is up to date -- reinstalling
warning: linux66-headers-6.6.36-1 is up to date -- reinstalling
warning: dkms-3.0.12-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (4) base-devel-1-3 dkms-3.0.12-1 git-2.45.2-1 linux66-headers-6.6.36-1
Total Download Size: 3.75 MiB
Total Installed Size: 147.11 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
5) Clone, build and install any AUR helper for later use:
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
6) Clone, compile and install ZFS-DKMS from AUR (zfs-dkms and zfs-utils may not be compatible with latest kernels all the time):
paru -S zfs-dkms-git zfs-utils-git
7) Try to load the ZFS module:
sudo modprobe -v zfs
insmod /lib/modules/6.9.7-arch1-1/updates/dkms/spl.ko.zst
insmod /lib/modules/6.9.7-arch1-1/updates/dkms/zfs.ko.zst
8) If you're using systemd, configure to auto-start ZFS services at boot. This is not important since "sudo zpool import" automatically loads the zfs module:
sudo systemctl enable zfs-import-cache
sudo systemctl enable zfs-import-scan
sudo systemctl enable zfs-mount
sudo systemctl enable zfs.target
Created symlink '/etc/systemd/system/zfs-import.target.wants/zfs-import-cache.service' → '/usr/lib/systemd/system/zfs-import-cache.service'.
Created symlink '/etc/systemd/system/zfs-import.target.wants/zfs-import-scan.service' → '/usr/lib/systemd/system/zfs-import-scan.service'.
Created symlink '/etc/systemd/system/zfs.target.wants/zfs-mount.service' → '/usr/lib/systemd/system/zfs-mount.service'.
Created symlink '/etc/systemd/system/multi-user.target.wants/zfs.target' → '/usr/lib/systemd/system/zfs.target'.
9) Check that the module is loaded by the kernel:
sudo dmesg
[ +46.248437] spl: loading out-of-tree module taints kernel.
[ +0.000011] spl: module verification failed: signature and/or required key missing - tainting kernel
[ +0.084871] zfs: module license 'CDDL' taints kernel.
[ +0.000003] Disabling lock debugging due to kernel taint
[ +0.000038] zfs: module license taints kernel.
[ +1.873704] ZFS: Loaded module v2.2.99-537_gfd51786f86, ZFS pool version 5000, ZFS filesystem version 5
Reboot when required.
Links:
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.