KB450127 – Updating ZFS on CentOS 7.6

Last modified: December 18, 2019
You are here:
Estimated reading time: 1 min

Below are the recommended steps taken to update to CentOS 7.6 without breaking the ZFS packages.

– Uninstall ZFS and spl packages. After running these commands, be sure to check that all dependencies are removed by using rpm qa | grep zfs

yum remove zfs* -y
yum remove zfs-dkms -y
yum remove libzfs2 -y
yum remove spl* -y

Run these commands to clean the mirror cache. After running yum clean all, you’ll be prompted to remove some old files, do so.

yum clean all
yum makecache fast
rm -rf /var/cache/yum

– Remove your preconfig script if you have it, and download the most up to date version. Run the script with the below options to remove and install all relevant packages

rm -f preconfig
wget images.45drives.com/gtools/preconfig
chmod +x preconfig
./preconfig -stvzf

– The script will auto reboot the server, after the reboot, re-run preconfig to remove the old kernel.When that finishes the server will reboot once more. When it comes back everything should be updated and back to normal.

Note: This will require some down time if the servers are in production. If you are running a cluster, you have the option to do one server at a time to avoid complete downtime of the cluster
storage.

 

Below are the recommended steps taken if you’ve update to CentOS 7.6 and broken the ZFS packages.

– Uninstall ZFS and spl packages, as well as removing a few modules

yum remove zfs* -y
yum remove libzfs2 -y
yum remove spl* -y
rm -rf /lib/modules/*/extra/*
rm -rf /lib/modules/*/weak-updates/*

– Remove your preconfig script if you have it, and download the most up to date version. Run the script with the below options to remove and install all relevant packages

rm -f preconfig
wget images.45drives.com/gtools/preconfig
chmod +x preconfig
./preconfig -zf

– The script will auto reboot the server, when it comes back you’ll need to run the first two commands to clean the mirror cache. After running yum clean all, you’ll be prompted to remove some old files, do so. Then re-run preconfig to remove the old kernel.

yum clean all
yum makecache fast
./preconfig -af

– When that finishes the server will reboot once more. When it comes back everything should be updated and back to normal.

Note: This will require some down time if the servers are in production. If you are running a cluster, you have the option to do one server at a time to avoid complete downtime of the cluster storage.

Was this article helpful?
Dislike 0
Views: 466
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access