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

https://docs.rockylinux.org/books/lxd_server/01-install/

Install the repo instructions for getting zfs

dnf install https://zfsonlinux.org/epel/zfs-release-2-2$(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

or

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

Put a filesystem called data on it:

zfs create datapool/data

Private
Yes