Intro
The (Z)(F)ile(S)ystem is an incredible software raid filesystem. It includes features not found in other filesystems. ZFS is robust, scaleable, and easy to administor. Thanks to zol (zfs on Linux) we can now enjoy its features on linux as well as BSD based distributions. ZFS uses storage pools as a way to manage physical storage. So rather than having a filesystem on top of one physical device, ZFS pools these physical devices together into a storage pool. ZFS is transactional, self healing, and incredibly scaleable. This tutorial will go over how to install ZFS on CentOS Stream 8.
ZFS Installation
First add the public signing key.
$ sudo -i
# dnf install epel-release
# source /etc/os-release
# dnf install https://zfsonlinux.org/epel/zfs-release.el8_4.noarch.rpm
...
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux
Now we can choose to install either the DKMS packages or the kABI-tracking kmod.
ZFS DKMS
DKMS is made for users running a custom kernel or users who would like to apply local customization for OpenZFS.
# dnf install epel-release kernel-devel zfs
ZFS kABI-tracking kmod
The kABI-tracking kmod is recommended for users with standard kernels who wish to not rebuild OpenZFS every kernel update.
First we must switch the default repository from DKMS to kABI-Tracking.
# dnf config-manager --disable zfs
# dnf config-manager --enable zfs-kmod
# dnf install zfs
Auto starting ZFS modules
By default the kernel modules are only loaded when a ZFS filesystem is detected. If you would rather the modules be loaded at boot time, run this command.
# echo zfs >/etc/modules-load.d/zfs.conf
Conclusion
You have successfully installed ZFS on centOS Stream 8. Now add some disks, create some zpools and enjoy ZFS on your centOS Linux machine!
If you have any questions or feel you can better this content, please get ahold of us and let us know on social media or our contact page.
As always, follows us @vulnifo for updates!