2

After 959 days a reboot was needed on the CentOS 7 system which has used ZFS flawlessly for the past years. I have run yum update once a month during that time.

The rebootet system is apparently unable to load its ZFS module, as evidenced by

# zpool list
/dev/zfs and /proc/self/mounts are required.
Try running 'udevadm trigger' and 'mount -t proc proc /proc' as root.
# modprobe zfs
modprobe: FATAL: Module zfs not found.
# uname -a
Linux foo 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
# yum install zfs zfs-kmod
Package zfs-0.7.13-1.el7_6.x86_64 already installed and latest version
Package kmod-zfs-0.7.13-1.el7_6.x86_64 already installed and latest version
Nothing to do

/proc is mounted and udevadm trigger has no effect. /dev/zfs does not exist. Grepping dmesg for ZFS (case insensitive) is empty. Manually loading the module says

# modprobe zfs
modprobe: FATAL: Module zfs not found.

I'm stumped. How can I get ZFS going again?

Edit

One problem was that my repo in /etc/yum.repos.d/zfs.repo was still for 7.6, while /etc/yum.repos.d/zfs.repo.rpmnew was for 7.9. I have saved the old zfs.repo and copied the one for 7.9 onto zfs.repo. Then followed the instructions for kABI again. Now I'm getting this:

# yum install zfs
Resolving Dependencies
--> Running transaction check
---> Package spl.x86_64 0:0.7.13-1.el7_6 will be obsoleted
--> Processing Dependency: spl = 0.7.13 for package: kmod-spl-0.7.13-1.el7_6.x86_64
---> Package zfs.x86_64 0:0.7.13-1.el7_6 will be updated
--> Processing Dependency: zfs = 0.7.13 for package: kmod-zfs-0.7.13-1.el7_6.x86_64
---> Package zfs.x86_64 0:2.0.7-1.el7 will be obsoleting
--> Processing Dependency: libzpool4 = 2.0.7 for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libzfs4 = 2.0.7 for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libuutil3 = 2.0.7 for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libnvpair3 = 2.0.7 for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libzpool.so.4()(64bit) for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libzfs_core.so.3()(64bit) for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libzfs.so.4()(64bit) for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libuutil.so.3()(64bit) for package: zfs-2.0.7-1.el7.x86_64
--> Processing Dependency: libnvpair.so.3()(64bit) for package: zfs-2.0.7-1.el7.x86_64
--> Running transaction check
---> Package kmod-zfs.x86_64 0:0.7.13-1.el7_6 will be updated
---> Package kmod-zfs.x86_64 0:2.0.7-1.el7 will be an update
---> Package libnvpair1.x86_64 0:0.7.13-1.el7_6 will be obsoleted
---> Package libnvpair3.x86_64 0:2.0.7-1.el7 will be obsoleting
---> Package libuutil1.x86_64 0:0.7.13-1.el7_6 will be obsoleted
---> Package libuutil3.x86_64 0:2.0.7-1.el7 will be obsoleting
---> Package libzfs2.x86_64 0:0.7.13-1.el7_6 will be obsoleted
---> Package libzfs4.x86_64 0:2.0.7-1.el7 will be obsoleting
---> Package libzpool2.x86_64 0:0.7.13-1.el7_6 will be obsoleted
---> Package libzpool4.x86_64 0:2.0.7-1.el7 will be obsoleting
---> Package spl.x86_64 0:0.7.13-1.el7_6 will be obsoleted
--> Processing Dependency: spl = 0.7.13 for package: kmod-spl-0.7.13-1.el7_6.x86_64
--> Finished Dependency Resolution
Error: Package: kmod-spl-0.7.13-1.el7_6.x86_64 (@zfs-kmod)
           Requires: spl = 0.7.13
           Removing: spl-0.7.13-1.el7_6.x86_64 (@zfs-kmod)
               spl = 0.7.13-1.el7_6
           Obsoleted By: zfs-2.0.7-1.el7.x86_64 (zfs-kmod)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

# yum install --skip-broken zfs
[...]
Packages skipped because of dependency problems:
    kmod-zfs-2.0.7-1.el7.x86_64 from zfs-kmod
    libnvpair3-2.0.7-1.el7.x86_64 from zfs-kmod
    libuutil3-2.0.7-1.el7.x86_64 from zfs-kmod
    libzfs4-2.0.7-1.el7.x86_64 from zfs-kmod
    libzpool4-2.0.7-1.el7.x86_64 from zfs-kmod
    zfs-2.0.7-1.el7.x86_64 from zfs-kmod

How I can I resolve the dependency problems?

1
  • I rolled back your latest edit adding the solution to the question. If you have a solution that is not mentioned below, then consider adding your own answer and accepting that rather than modifying the question. This is totally acceptable. You may also modify (or suggest an edit to) a given answer, if it isn't complete enough. Also, a question is considered "solved" when an answer is accepted, so tagging the title with "SOLVED" is not necessary.
    – Kusalananda
    Commented Jan 12, 2022 at 19:17

1 Answer 1

2

959 days without reboot? Wow. I assume you are not using kexec so that means you have booted the new kernel for the first time. The problem is the ZFS module you have installed is build for a different kernel so you can't load it now.

Your options:

  • Try using the weak-modules skript (weak-modules --add-kernel --no-initramfs if you don't need ZFS in initramfs). If there wasn't a kABI change it will symlink the module to the new /lib/module directory to make it usable with the new kernel. (If this is really the first time you are using a new kernel there probably was a kABI change.)
  • If above doesn't work you can try reinstalling the packages. OpenZFS mentions this as a necessary step when upgrading between CentOS minor versions.
    1. You'll need to remove the existing zfs, spl and kmod-zfs packages first with yum remove zfs spl kmod-zfs.
    2. Install the latest repository for 7.9 from OpenZFS.
    yum install https://zfsonlinux.org/epel/zfs-release.el7_9.noarch.rpm
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux
    
    1. Install zfs and kmod-zfs from the newly added repo.
  • You can also try installing the DKMS module (which will be automatically rebuilt after a kernel update) instead of the kmod package you are using now.
7
  • Where would I find weak-update? It's not installed and yum search weak shows nothing appropriate. The OpenZFS page uses rpm -E %distro as part of a string which results in %distro, which looks odd. Would that part be el7? Thanks Vojtech!
    – Jens
    Commented Jan 11, 2022 at 20:35
  • Sorry, the script is called weak-modules. Commented Jan 11, 2022 at 20:45
  • The rpm -E %distro part really looks weird, the %distro is not a valid RPM macro on CentOS. The want el7_X where X is minor version so most likely 9 in your case (if you really have latest updates). Commented Jan 11, 2022 at 20:56
  • Hm. I followed the instructions for "kABI-tracking kmod", rebooted, still the same problem. I never used weak-update, how would I call it (which arguments)?
    – Jens
    Commented Jan 11, 2022 at 21:42
  • 1
    That did it: yum erase zfs kmod-zfs, along with yum erase spl. After the reboot my pools are back! Btw, package spl seems gone with 7.9. You saved my life. :)
    – Jens
    Commented Jan 12, 2022 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .