Rebuild ZFS package on CentOS 6.6 after yum upgrade fucks up

In case you run into the same shit as I did, major upgrading a KVM installation where ZFS is used and the upgrade processes breaks ZFS, then you´ll have to deep-clean the system and reinstall.

My versions (after upgrade):

CentOS 6.6
Kernel: Linux vm2 2.6.32-573.8.1.el6.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

[root@vm2 ~]# yum list installed | grep zfs
libnvpair1.x86_64 @zfs
libuutil1.x86_64 @zfs
libzfs2.x86_64 @zfs
libzpool2.x86_64 @zfs
spl.x86_64 @zfs
spl-dkms.noarch @zfs
zfs.x86_64 @zfs
zfs-dkms.noarch @zfs
zfs-release.noarch 1-4.el6 @/zfs-release.el6.noarch


FATAL: Error inserting zfs (/lib/modules/[KERNEL_VERSION]/addon/zfs/zfs/zfs.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Remove all ZFS installations:

dkms status
dkms remove spl/0.6.3 --all
dkms remove zfs/0.6.3 --all

Remove crap:

find /lib/modules/$(uname -r)/extra -name "splat.ko" -or -name "zcommon.ko" -or -name "zpios.ko" -or
-name "spl.ko" -or -name "zavl.ko" -or -name "zfs.ko" -or -name "znvpair.ko" -or -name "zunicode.ko" |
xargs rm -f
> find /lib/modules/$(uname -r)/weak-updates/ -name "splat.ko" -or -name "zcommon.ko" -or -name
"zpios.ko" -or -name "spl.ko" -or -name "zavl.ko" -or -name "zfs.ko" -or -name "znvpair.ko" -or -name
"zunicode.ko" | xargs rm -f

Check current linux kernel (uname -a) and delete (yum erase) all other from this list:

rpm -qa | grep kernel

After all old kernels + devlibs etc have been removed, remove ZFS and its components:

yum erase zfs zfs-dkms libzfs2 spl spl-dkms dkmsc

Lastly, install ZFS again:

yum install zfs

And if you´re as lucky as I was, ZFS will now work again as expected 🙂

zpool status [data-pool]

Instructions was found on them internetz.


3 thoughts on “Rebuild ZFS package on CentOS 6.6 after yum upgrade fucks up

  1. Thanks, this was useful 🙂

    Every time I update my CentOS box I need to kick ZFS to get it working :-/ Bit disappointing…


    Instead of `find .. | xargs rm -f` you can just use `find .. -delete`. The `| xargs` will break once a filename contains a space or other special character (you can get around this with `find .. -print0 | xargs -0`, but it’s non-standard. And if you want to execute stuff `find .. -exec {} \;` works just as well).

  2. It looks like this is the pattern with CentOS / ZFSOL / Updates.

    I’m fed up using DKMS and I’m going to try kABI now.

    Per the zfsonlinux post here

    By default the zfs-release package is configured to install DKMS style packages so they will work with a wide range of kernels. In order to install the kABI-tracking kmods the baseurl in the /etc/yum.repos.d/zfs.repo file must be updated as shown. Keep in mind that the kABI-tracking kmods are only verified to work with the distribution provided kernel.

Leave a Reply

Your email address will not be published. Required fields are marked *