Install zfs on Rocky Linux

By gill, 2 September, 2023

From a fresh Rocky Linux install, need to add some repos.

# dnf install epel-release -y

Install the repo instructions for getting zfs

dnf install$(rpm --eval "%{dist}").noarch.rpm

Installing zfs pulls in all the kernel modding requirements like kernel-devel and gcc

dnf install zfs

Load the zfs module

/sbin/modprobe zfs

Add some disks (use lsblk to see what's attached) in a pool (see zfs docs to decide with raid to use)

zpool create datapool mirror /dev/sdb /dev/sdc


zpool create datapool raidz /dev/sdb /dev/sdc

Put a filesystem called data on it:

zfs create datapool/data