CentOS - elventear/devops GitHub Wiki

yum update zfs/kernel

One of the big problems with yum update is that zfs doesn't load after the update. It's been difficult to figure out exactly what's causing the problems, but it seems to be related to old kernels. Before an update, therefore, remove all kernels below the running kernel:

rpm -qa | grep ^kernel
uname -a
yum remove kernel-devel-2.6.32-431.20.3.el6.x86_64 kernel-2.6.32-431.20.3.el6.x86_64

Verify that there are no dead links:

find /lib/modules -type l ! -readable 
# Verify
find /lib/modules -type l ! -readable -exec rm {} \;
yum remove zfs zfs-dkms spl spl-dkms dkms
rm -rf /etc/dkms
rm -rf /var/lib/dkms
rm /lib/modules/*/extra/*
yum install zfs

If there are, remove them. Reinstall zfs:

After the reboot, be sure the zfs mounts are there:

df

If they are there, then

bivio release install_host_stream  # alias bihs

If they aren't there, then you can probably recover by updating the kernel again, because the /var partition is on ext3 so the rpm/yum dbs are "out of date" with respect to the actual kernel.

Look at https://github.com/zfsonlinux/zfs/issues/1155 for another way to rebuild dkms/zfs:

v=0.6.3
dkms remove -m zfs -v $v --all
dkms remove -m spl -v $v --all
dkms add -m spl -v $v
dkms add -m zfs -v $v
dkms install -m spl -v $v
dkms install -m zfs -v $v
dkms status

Also, look in /var/lib/dkms/{zfs,spl}/ for old versions. There should only be one.

You may also need to import the pool explicitly

zpool status
No pools available
zpool import -f zp1