RedHat Enterprise Linux, and distrobutions based on it such as Rocky and Alma Linux, do not come by default with a kernel that supports BTRFS. This is easily added via a Special Interest Group (SIG) kernel repository, which supplies both a newer kernel release and the needed btrfs-progs package.

Steps to install is simple:

# Install the SIG RPM key.
sudo rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Kmods

# Install the repository.
cat > /etc/yum.repos.d/centos-kmods-kernel-latest.repo <<'EOF'
[centos-kmods-kernel-latest-repos]
name=CentOS $releasever - Kmods - Kernel Latest - Repositories
metalink=https://mirrors.centos.org/metalink?repo=centos-kmods-sig-kernel-latest-$releasever&arch=$basearch&protocol=https,http
#baseurl=http://mirror.stream.centos.org/SIGs/$releasever/kmods/$basearch/kernel-latest
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Kmods
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
EOF

# Update the kernel to the latest from the repository added.
dnf update

# Install the btrfs-progs package to add needed utilities for interacting with BTRFS file systems.
dnf install btrfs-progs

Previous Post Next Post