Debian: ZFS 설치 오류: /lib/modules/4.19.0-14-amd64 디렉토리에서 zfs 모듈을 찾을 수 없습니다.

Debian: ZFS 설치 오류: /lib/modules/4.19.0-14-amd64 디렉토리에서 zfs 모듈을 찾을 수 없습니다.

Debian에 ZFS를 설치했지만 작동할 수 없습니다.


다음과 같이 zfs를 설치하려고 합니다.

  1. 나는 이것을 다음에 추가합니다 /etc/apt/sources.list:
deb http://deb.debian.org/debian/ buster main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib
  1. apt update그리고apt upgrade
  2. Buster-backports, zfsutils-linux, zfs-dkms, dpkg-dev, linux-headers-$(uname -r), linux-image-amd64 패키지를 설치했습니다.
  3. 이 시점에서 문제가 발생합니다.

전화할 때 다음 오류가 발생합니다 modprobe.

root@server /dev# modprobe zfs
modprobe: FATAL: **Module zfs not found in directory /lib/modules/4.19.0-14-amd64**

이것은 내 Journalctl입니다.

Feb 19 13:33:46 bytserver systemd[1]: Starting Install ZFS kernel module...
Feb 19 13:33:46 bytserver modprobe[490]: modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.0-14-amd64
Feb 19 13:33:46 bytserver systemd[1]: zfs-load-module.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 13:33:46 bytserver systemd[1]: zfs-load-module.service: Failed with result 'exit-code'.
Feb 19 13:33:46 bytserver systemd[1]: Failed to start Install ZFS kernel module.
Feb 19 13:33:46 bytserver systemd[1]: Dependency failed for Import ZFS pools by cache file.
Feb 19 13:33:46 bytserver systemd[1]: zfs-import-cache.service: Job zfs-import-cache.service/start failed with result 'dependency'.
Feb 19 13:33:46 bytserver systemd[1]: Reached target ZFS pool import target.
Feb 19 13:33:46 bytserver systemd[1]: Condition check resulted in Mount ZFS filesystems being skipped.
Feb 19 13:33:46 bytserver systemd[1]: Starting Wait for ZFS Volume (zvol) links in /dev...
Feb 19 13:33:46 bytserver zvol_wait[496]: The ZFS modules are not loaded.
Feb 19 13:33:46 bytserver zvol_wait[496]: Try running '/sbin/modprobe zfs' as root to load them.
Feb 19 13:33:46 bytserver systemd[1]: Started Wait for ZFS Volume (zvol) links in /dev.
Feb 19 13:33:46 bytserver systemd[1]: Reached target ZFS volumes are ready.
Feb 19 13:33:46 bytserver systemd[1]: Starting ZFS file system shares...
Feb 19 13:33:46 bytserver zfs[567]: The ZFS modules are not loaded.
Feb 19 13:33:46 bytserver zfs[567]: Try running '/sbin/modprobe zfs' as root to load them.
Feb 19 13:33:46 bytserver systemd[1]: zfs-share.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 13:33:46 bytserver systemd[1]: zfs-share.service: Failed with result 'exit-code'.
Feb 19 13:33:46 bytserver systemd[1]: Failed to start ZFS file system shares.
Feb 19 13:33:46 bytserver systemd[1]: Reached target ZFS startup target.
Feb 19 13:33:47 bytserver containerd[596]: time="2021-02-19T13:33:47.608958319+01:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1
Feb 19 13:33:47 bytserver containerd[596]: time="2021-02-19T13:33:47.609214490+01:00" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="path /var/lib/containerd/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
Feb 19 14:27:39 bytserver sudo[1725]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/bin/apt install zfs
Feb 19 14:27:53 bytserver sudo[2199]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/bin/apt install zfs
Feb 19 14:30:58 bytserver sudo[2721]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/bin/apt-get install zfs-dkms
Feb 19 14:31:21 bytserver sudo[2730]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/sbin/modprobe zfs
Feb 19 14:31:29 bytserver sudo[2757]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/bin/apt install zfs
Feb 19 14:34:21 bytserver sudo[2844]:     john : TTY=pts/1 ; PWD=/dev/disk/by-label ; USER=root ; COMMAND=/usr/bin/add-apt-repository ppa:zfs-native/stable
Feb 19 14:52:35 bytserver sudo[4094]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/vi /etc/apt/sources.list
Feb 19 14:53:47 bytserver sudo[4117]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt update
Feb 19 14:53:59 bytserver sudo[4562]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/vi /etc/apt/sources.list
Feb 19 14:54:08 bytserver sudo[4569]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt update
Feb 19 14:54:54 bytserver sudo[5016]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/su
Feb 19 14:56:22 bytserver sudo[6783]:     root : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt upgrade
Feb 19 14:56:59 bytserver sudo[6821]:    john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt install --yes -t buster-backports --no-install-recommends zfs-dkms
Feb 19 14:57:20 bytserver sudo[6902]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt install --yes -t buster-backports zfsutils-linux
Feb 19 14:57:39 bytserver sudo[6925]:     john : TTY=pts/1 ; PWD=/home/john/openzfs-docs ; USER=root ; COMMAND=/usr/bin/apt install --yes mdadm
Feb 19 15:03:10 bytserver sudo[7047]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/apt install -t buster-backports zfsutils-linux
Feb 19 15:03:23 bytserver sudo[7051]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/apt install -t buster-backports zfsutils-linu
Feb 19 15:03:33 bytserver sudo[7055]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/apt install zfs-dkms
Feb 19 15:05:36 bytserver systemd-udevd[7143]: Process '/sbin/modprobe zfs' failed with exit code 1.
Feb 19 15:07:20 bytserver systemd-udevd[7149]: Process '/sbin/modprobe zfs' failed with exit code 1.
Feb 19 15:10:51 bytserver sudo[7299]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/apt-get -y install zfs-dkms
Feb 19 15:11:58 bytserver sudo[7322]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/systemctl restart zfs-import-cache
Feb 19 15:11:58 bytserver systemd[1]: Starting Install ZFS kernel module...
Feb 19 15:11:58 bytserver modprobe[7325]: modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.0-14-amd64
Feb 19 15:11:58 bytserver systemd[1]: zfs-load-module.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 15:11:58 bytserver systemd[1]: zfs-load-module.service: Failed with result 'exit-code'.
Feb 19 15:11:58 bytserver systemd[1]: Failed to start Install ZFS kernel module.
Feb 19 15:11:58 bytserver systemd[1]: Dependency failed for Import ZFS pools by cache file.
Feb 19 15:11:58 bytserver systemd[1]: zfs-import-cache.service: Job zfs-import-cache.service/start failed with result 'dependency'.
Feb 19 15:15:56 bytserver sudo[7387]:     john : TTY=pts/1 ; PWD=/home/john ; USER=root ; COMMAND=/usr/bin/apt-get install zfsutils-linux

이를 진단하고 해결하려면 어떻게 해야 합니까?
당신의 도움에 감사드립니다

답변1

Linux 커널이 패키지 소스에 포함된 zfs 버전과 호환되지 않기 때문에 Debian 시스템에서 zfs 커널 모듈을 빌드할 수 없습니다.

당신은 갈 수 있습니다https://zfsonlinux.org/, Linux 커널 버전과 호환되는 버전을 구하고 zfs요구 사항에 맞게 커널을 빌드하십시오.

예를 들어, 현재 zfs 버전 2.0.7은 커널 3.10 - 5.15를 사용하는 Linux를 지원합니다.

zfs 커널 모듈 설치

zfs 버전 받기

wget https://github.com/openzfs/zfs/releases/download/zfs-2.0.7/zfs-2.0.7.tar.gz

빌드 및 설치

tar -xvzf zfs-2.0.7.tar.gz
cd zfs-2.0.7
./configure
make
sudo make install

커널에서 모듈 추가

sudo modprobe -v zfs

답변2

커널을 업그레이드한 후 Ubuntu 22.04에서 비슷한 문제가 발생했습니다. 다음은 나를 위해 일했습니다

sudo apt purge --auto-remove zfsutils-linux 
sudo apt install zfs-dkms
sudo apt install zfsutils-linux

관련 정보