Centos8安装ZFS

阅读量: searchstar 2021-05-04 17:21:05
Categories: Tags:

查看当前centos版本号

cat /etc/redhat-release
CentOS Linux release 8.3.2011

然后

sudo dnf install https://zfsonlinux.org/epel/zfs-release.<dist>.noarch.rpm
gpg --import --import-options show-only /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux

其中<dist>换成版本号,比如我这个就是el8_3

DKMS

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled powertools

(上面这段是不是可以不要?)

sudo dnf install epel-release
sudo dnf install kernel-devel zfs

要等好久。

插入内核模块

/sbin/modprobe zfs

检查一下是否安装成功:

sudo zfs list

显示这个就说明装好了。

no datasets available

卸载

sudo yum remove zfs-release
# https://stackoverflow.com/a/25500911
rpm -e --nodeps $(yum list installed | grep zfs | awk '{ print $1 }')
# https://superuser.com/questions/513159/how-to-remove-systemd-services
sudo systemctl daemon-reload
sudo systemctl reset-failed

参考文献

官方教程:https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL%20and%20CentOS.html

https://github.com/openzfs/zfs

https://www.howtogeek.com/175159/an-introduction-to-the-z-file-system-zfs-for-linux/