Skip to content

文档,https://openzfs.github.io/openzfs-docs/man/index.html

一、安装ZFS

shell
yum install -y http://download.zfsonlinux.org/epel/zfs-release.el7_4.noarch.rpm
yum install -y zfs gdisk dosfstools
yum install -y http://download.zfsonlinux.org/epel/zfs-release.el7_4.noarch.rpm
yum install -y zfs gdisk dosfstools
  • 安装最新版本
shell
yum install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm

yum install zfs kernel-devel -y
yum install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm

yum install zfs kernel-devel -y
  • 启动
shell
# 开机自启zfs服务
systemctl enable --now zfs-import-scan.service zfs-mount zfs-import.target zfs-zed zfs.target

# 查看zfs-import-scan服务状态
systemctl status zfs-import-scan
# 开机自启zfs服务
systemctl enable --now zfs-import-scan.service zfs-mount zfs-import.target zfs-zed zfs.target

# 查看zfs-import-scan服务状态
systemctl status zfs-import-scan

二、加载模块

2.1手动加载zfs模块

shell
/usr/sbin/modprobe zfs
/usr/sbin/modprobe zfs

2.2自启加载

shell
echo zfs > /etc/modules-load.d/zfs.conf

echo "options zfs zfs_arc_max=2147483648"  >>/etc/modprobe.d/zfs.conf
echo zfs > /etc/modules-load.d/zfs.conf

echo "options zfs zfs_arc_max=2147483648"  >>/etc/modprobe.d/zfs.conf

2.3查看模块

shell
[root@other ~]# lsmod |grep zfs
zfs                  3457024  2
zunicode              331776  1 zfs
zavl                   16384  1 zfs
icp                   262144  1 zfs
zcommon                69632  1 zfs
znvpair                77824  2 zfs,zcommon
spl                   102400  4 zfs,icp,znvpair,zcommon
[root@other ~]# lsmod |grep zfs
zfs                  3457024  2
zunicode              331776  1 zfs
zavl                   16384  1 zfs
icp                   262144  1 zfs
zcommon                69632  1 zfs
znvpair                77824  2 zfs,zcommon
spl                   102400  4 zfs,icp,znvpair,zcommon

至此结束