Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450474 – Rocky 8 Linux ZFS Installation

You are here:

Scope/Description

  • This article will show how to install ZFS on Rocky Linux with DKMS.

Prerequisites

  • Rocky Linux

Steps

Updating Server

  • Ensure you update your server to the latest version.
[root@rocky-45d ~]# dnf update -y
If there is a kernel update, reboot the server. If there is no kernel update, you can continue to the next steps.

Install using Rocky Setup Script

Ensure the system is on the latest kernel, if it is not ZFS will fail the installation process.
  • They Rocky Linux Preconfig script will configure our 45Drives repository, configure ZFS and install our Houston user interface.
  • To run the script use the command below. It will download the script, then run it using bash.
curl -SLO https://scripts.45drives.com/rocky-preconfig.sh && bash rocky-preconfig.sh
  • Once the script is complete and has been run successfully, ZFS will be installed and Houston UI can be accessed at  https://{Server_IP}:9090

Manually Installing ZFS for Rocky

  • First we must install ZFS release package so we can then install and configure ZFS.
[root@rocky-45d ~]# source /etc/os-release
[root@rocky-45d ~]# dnf install https://zfsonlinux.org/epel/zfs-release.el${VERSION_ID/./_}.noarch.rpm
[root@rocky-45d ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux
  • Next, we must install epel-release.
[root@rocky-45d ~]# dnf install epel-release
  • Next, we install kernel-devel and zfs. This will compile ZFS, and if done correctly this process should take a few minutes to complete the installation.
[root@rocky-45d ~]# dnf install kernel-devel zfs

Configuring ZFS to load on boot

  • Now, we must configure ZFS to automatically load on boot.
[root@rocky-45d ~]# echo zfs > /etc/modules-load.d/zfs.conf

Starting ZFS manually

  • Finally, to load ZFS manually without needing to perform another reboot.
[root@rocky-45d ~]# modprobe zfs

Verification

  • We now have ZFS installed and configured, and can begin using ZFS to configure our storage.

Troubleshooting

The install process for ZFS on RHEL-distros is very particular. Often times when going through the installation process, it will not install the ZFS module correctly.
  • If seeing errors when running modprobe zfs, run dkms status.
[root@rocky-45d ~]# dkms status
  • If the output reports as zfs, 2.0.7; added it did not compile ZFS correctly.
  • To resolve we can remove the package, then re-install. First we remove it via dkms.
[root@rocky-45d ~]# dkms remove zfs/2.0.7 --all;
  • Next we can do the installation of the ZFS module.
[root@rocky-45d ~]# dkms --force install zfs/2.0.7;
  • This process should take a few minutes, as it is building ZFS. Once completed we should be able to modprobe zfs successfully.
[root@rocky-45d ~]# modprobe zfs
If we are seeing errors on the dkms –force install, most likely we have to update our kernel, ensure a dnf update was done followed up a reboot, then try again.

Further Reading

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