Logo

dev-resources.site

for different kinds of informations.

Setting Up OpenZFS on Rocky Linux

Published at
9/28/2023
Categories
zfs
opensource
filesystem
linux
Author
arthurkay
Categories
4 categories in total
zfs
open
opensource
open
filesystem
open
linux
open
Author
9 person written this
arthurkay
open
Setting Up OpenZFS on Rocky Linux

The RHEL distribution of OpenZFS has two main implementations of ZFS, outlined below:

  1. DKIMS (Dynamic Kernel Module Support)
    This implementation is built on the premise that; the system should automatically recompile all DKMS modules if a new kernel version is installed. This allows drivers and devices outside the mainline kernel to continue working after a Linux kernel upgrade.

  2. kABI-tracking kmod packages
    The Kernel Application Binary Interface (kABI) is a set of in-kernel symbols used by drivers and other kernel modules. Each major and minor RHEL kernel release has a bunch of in-kernel symbols that are whitelisted. A kABI-tracking kmod package contains a kernel module that is compatible with a given kABI, that is, for a given major and minor release of the EL kernel.

The RHEL OpenZFS packages are provided by the following repository:

For EL7:

yum install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm
Enter fullscreen mode Exit fullscreen mode

and for EL8 and 9:

dnf install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm
Enter fullscreen mode Exit fullscreen mode

After adding that repository, update your repository cache with either;

EL7

yum update -y
Enter fullscreen mode Exit fullscreen mode

EL8 And above

dnf update -y
Enter fullscreen mode Exit fullscreen mode

After that, you have the option to install either the DKMS or kABI-tracking kmod style packages.
I have not had any luck using the DKMS style package (which is the default) and as such, my personal preference is the kABI-tracking.

The commands that follow will only show how to install OpenZFS using EL 8 and above if you need to do this for EL 7 and below; replace dnf with yum and dnf config-manager with yum-config-manager

DKMS

Installing the DKMS style, requires the following three (3) commands:

dnf install -y epel-release
dnf install -y kernel-devel
dnf install -y zfs
Enter fullscreen mode Exit fullscreen mode

kABI Style

Installing the kABI-Tracking kmod, disable the default DKMS style and then install zfs with the following commands.

dnf config-manager --disable zfs
dnf config-manager --enable zfs-kmod
dnf install zfs
Enter fullscreen mode Exit fullscreen mode

By default, the OpenZFS kernel modules are automatically loaded when a ZFS pool is detected. If you would prefer to always load the modules at boot time you can create such configuration in /etc/modules-load.d:

Below is a helper command:

echo zfs >/etc/modules-load.d/zfs.conf
Enter fullscreen mode Exit fullscreen mode

After that, you can confirm if zfs is properly set by using modprobe, as shown below:

/sbin/modprobe zfs
Enter fullscreen mode Exit fullscreen mode

If you get an empty response, then all is well. Otherwise, get a cup of coffee and have fun debugging the issue.

filesystem Article's
30 articles in total
Favicon
List filenames recursively in a directory using this utility function.
Favicon
Where Does Deleted Data Go? Unveiling the Secrets of File Deletion and Overwriting
Favicon
Amazon FSx for NetApp ONTAP - Expert Storage for any workload
Favicon
Understanding the Linux Filesystem, Root File System, and EXT File System
Favicon
How to fix RHEL file system
Favicon
Understanding the Linux Filesystem: A Quick Guide
Favicon
Introducing Cora: A Powerful File Concatenation Tool for Developers
Favicon
Hitchhikers guide to building a distributed filesystem in Rust. The very beginning…
Favicon
Understanding Where Deleted Files Go After Deleting them from Recycle Bin and How to Recover Them
Favicon
I wrote a File System CLI in Rust
Favicon
La extravagante posibilidad de los espacios en los nombres de archivos.
Favicon
Starting with C
Favicon
Getting the list of files and their info
Favicon
Processing flags
Favicon
Sorting and formatting the output. The Finale.
Favicon
Command, file types and flags
Favicon
Unit test in Laravel by example
Favicon
What is File Manipulation?
Favicon
you are not the owner so you cannot change the permissions Error in Linux
Favicon
Setting Up OpenZFS on Rocky Linux
Favicon
How to extend an EBS volume in AWS and then grow EFS Filesystem
Favicon
Efficient File Naming Systems for Better File Management
Favicon
Improving the .NET API to work with the structure of the file system. Part 2. Manipulate filesystem objects.
Favicon
Improving the .NET API to work with the structure of the file system. Part 1. Enumerate filesystem objects.
Favicon
How to format SD Card to APFS on Mac
Favicon
What are linux inodes?
Favicon
Block and Filesystem side-by-side with K8s and Aerospike
Favicon
How to copy lots of data fast?
Favicon
EFS vs. FSx for ONTAP
Favicon
Use Inflint to follow files and folders convention

Featured ones: