CentOS7.5にZFS on Linux を入れる

参考資料
ゼロから CentOS 7 をインストールし ZFS で RAIDZ を使ってみた – Lunasalt.com http://lunasalt.com/?p=5015
RHEL and CentOS · zfsonlinux/zfs Wiki · GitHub https://github.com/zfsonlinux/zfs/wiki/RHEL-and-CentOS

環境

# cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)

リポジトリの追加

# yum install http://download.zfsonlinux.org/epel/zfs-release.el7_5.noarch.rpm
Loaded plugins: fastestmirror
zfs-release.el7_5.noarch.rpm                                                                                                | 5.3 kB  00:00:00
Examining /var/tmp/yum-root-BhqdhO/zfs-release.el7_5.noarch.rpm: zfs-release-1-5.el7.centos.noarch
Marking /var/tmp/yum-root-BhqdhO/zfs-release.el7_5.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package zfs-release.noarch 0:1-5.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                         Arch                       Version                            Repository                                     Size
===================================================================================================================================================
Installing:
 zfs-release                     noarch                     1-5.el7.centos                     /zfs-release.el7_5.noarch                     2.9 k

Transaction Summary
===================================================================================================================================================
Install  1 Package

Total size: 2.9 k
Installed size: 2.9 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : zfs-release-1-5.el7.centos.noarch                                                                                               1/1
  Verifying  : zfs-release-1-5.el7.centos.noarch                                                                                               1/1

Installed:
  zfs-release.noarch 0:1-5.el7.centos

Complete!
# yum install zfs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                                                                                        | 3.6 kB  00:00:00
extras                                                                                                                      | 3.4 kB  00:00:00
updates                                                                                                                     | 3.4 kB  00:00:00
zfs                                                                                                                         | 2.9 kB  00:00:00
(1/5): base/7/x86_64/group_gz                                                                                               | 166 kB  00:00:00
(2/5): extras/7/x86_64/primary_db                                                                                           | 149 kB  00:00:00
(3/5): updates/7/x86_64/primary_db                                                                                          | 2.7 MB  00:00:00
(4/5): base/7/x86_64/primary_db                                                                                             | 5.9 MB  00:00:00
(5/5): zfs/x86_64/primary_db                                                                                                |  12 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package zfs.x86_64 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: zfs-kmod = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: spl = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzpool2 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs2 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libuutil1 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libnvpair1 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: sysstat for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzpool.so.2()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs_core.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs.so.2()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libuutil.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libnvpair.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Running transaction check
---> Package libnvpair1.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libuutil1.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libzfs2.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libzpool2.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package spl.x86_64 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: spl-kmod = 0.7.9 for package: spl-0.7.9-1.el7_5.x86_64
---> Package sysstat.x86_64 0:10.1.5-13.el7 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: sysstat-10.1.5-13.el7.x86_64
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Processing Dependency: kernel-devel for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Processing Dependency: gcc for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-28.el7_5.1 will be installed
--> Processing Dependency: cpp = 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
---> Package kernel-devel.x86_64 0:3.10.0-862.3.3.el7 will be installed
---> Package lm_sensors-libs.x86_64 0:3.4.0-4.20160601gitf9185e5.el7 will be installed
---> Package spl-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.2 for package: spl-dkms-0.7.9-1.el7_5.noarch
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
---> Package spl-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.2 for package: spl-dkms-0.7.9-1.el7_5.noarch
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
---> Package spl-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.2 for package: spl-dkms-0.7.9-1.el7_5.noarch
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-862.3.3.el7 will be installed
---> Package spl-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.2 for package: spl-dkms-0.7.9-1.el7_5.noarch
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Finished Dependency Resolution
Error: Package: spl-dkms-0.7.9-1.el7_5.noarch (zfs)
           Requires: dkms >= 2.2.0.2
Error: Package: zfs-dkms-0.7.9-1.el7_5.noarch (zfs)
           Requires: dkms >= 2.2.0.3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

できない

EPEL追加する

# yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                                                                                        | 3.6 kB  00:00:00
extras                                                                                                                      | 3.4 kB  00:00:00
updates                                                                                                                     | 3.4 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                                 Arch                              Version                         Repository                         Size
===================================================================================================================================================
Installing:
 epel-release                            noarch                            7-11                            extras                             15 k

Transaction Summary
===================================================================================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                                |  15 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                                        1/1
  Verifying  : epel-release-7-11.noarch                                                                                                        1/1

Installed:
  epel-release.noarch 0:7-11

Complete!


# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo
# yum --enablerepo=epel install zfs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: mirror.dmmlabs.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package zfs.x86_64 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: zfs-kmod = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: spl = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzpool2 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs2 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libuutil1 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libnvpair1 = 0.7.9 for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: sysstat for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzpool.so.2()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs_core.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libzfs.so.2()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libuutil.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Processing Dependency: libnvpair.so.1()(64bit) for package: zfs-0.7.9-1.el7_5.x86_64
--> Running transaction check
---> Package libnvpair1.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libuutil1.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libzfs2.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package libzpool2.x86_64 0:0.7.9-1.el7_5 will be installed
---> Package spl.x86_64 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: spl-kmod = 0.7.9 for package: spl-0.7.9-1.el7_5.x86_64
---> Package sysstat.x86_64 0:10.1.5-13.el7 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: sysstat-10.1.5-13.el7.x86_64
---> Package zfs-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Processing Dependency: dkms >= 2.2.0.3 for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Processing Dependency: kernel-devel for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Processing Dependency: gcc for package: zfs-dkms-0.7.9-1.el7_5.noarch
--> Running transaction check
---> Package dkms.noarch 0:2.6.1-1.el7 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.6.1-1.el7.noarch
---> Package gcc.x86_64 0:4.8.5-28.el7_5.1 will be installed
--> Processing Dependency: cpp = 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-28.el7_5.1.x86_64
---> Package kernel-devel.x86_64 0:3.10.0-862.3.3.el7 will be installed
---> Package lm_sensors-libs.x86_64 0:3.4.0-4.20160601gitf9185e5.el7 will be installed
---> Package spl-dkms.noarch 0:0.7.9-1.el7_5 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package elfutils-libelf-devel.x86_64 0:0.170-4.el7 will be installed
--> Processing Dependency: pkgconfig(zlib) for package: elfutils-libelf-devel-0.170-4.el7.x86_64
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-862.3.3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                                 Arch                     Version                                          Repository                 Size
===================================================================================================================================================
Installing:
 zfs                                     x86_64                   0.7.9-1.el7_5                                    zfs                       413 k
Installing for dependencies:
 cpp                                     x86_64                   4.8.5-28.el7_5.1                                 updates                   5.9 M
 dkms                                    noarch                   2.6.1-1.el7                                      epel                       75 k
 elfutils-libelf-devel                   x86_64                   0.170-4.el7                                      base                       38 k
 gcc                                     x86_64                   4.8.5-28.el7_5.1                                 updates                    16 M
 glibc-devel                             x86_64                   2.17-222.el7                                     base                      1.1 M
 glibc-headers                           x86_64                   2.17-222.el7                                     base                      678 k
 kernel-devel                            x86_64                   3.10.0-862.3.3.el7                               updates                    16 M
 kernel-headers                          x86_64                   3.10.0-862.3.3.el7                               updates                   7.1 M
 libmpc                                  x86_64                   1.0.1-3.el7                                      base                       51 k
 libnvpair1                              x86_64                   0.7.9-1.el7_5                                    zfs                        30 k
 libuutil1                               x86_64                   0.7.9-1.el7_5                                    zfs                        35 k
 libzfs2                                 x86_64                   0.7.9-1.el7_5                                    zfs                       130 k
 libzpool2                               x86_64                   0.7.9-1.el7_5                                    zfs                       591 k
 lm_sensors-libs                         x86_64                   3.4.0-4.20160601gitf9185e5.el7                   base                       41 k
 mpfr                                    x86_64                   3.1.1-4.el7                                      base                      203 k
 spl                                     x86_64                   0.7.9-1.el7_5                                    zfs                        29 k
 spl-dkms                                noarch                   0.7.9-1.el7_5                                    zfs                       456 k
 sysstat                                 x86_64                   10.1.5-13.el7                                    base                      310 k
 zfs-dkms                                noarch                   0.7.9-1.el7_5                                    zfs                       4.9 M
 zlib-devel                              x86_64                   1.2.7-17.el7                                     base                       50 k

Transaction Summary
===================================================================================================================================================
Install  1 Package (+20 Dependent packages)

Total download size: 54 M
Installed size: 128 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/21): elfutils-libelf-devel-0.170-4.el7.x86_64.rpm                                                                        |  38 kB  00:00:00
warning: /var/cache/yum/x86_64/7/epel/packages/dkms-2.6.1-1.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for dkms-2.6.1-1.el7.noarch.rpm is not installed
(2/21): dkms-2.6.1-1.el7.noarch.rpm                                                                                         |  75 kB  00:00:00
(3/21): glibc-headers-2.17-222.el7.x86_64.rpm                                                                               | 678 kB  00:00:00
(4/21): glibc-devel-2.17-222.el7.x86_64.rpm                                                                                 | 1.1 MB  00:00:00
(5/21): cpp-4.8.5-28.el7_5.1.x86_64.rpm                                                                                     | 5.9 MB  00:00:00
(6/21): libmpc-1.0.1-3.el7.x86_64.rpm                                                                                       |  51 kB  00:00:00
(7/21): kernel-headers-3.10.0-862.3.3.el7.x86_64.rpm                                                                        | 7.1 MB  00:00:00
(8/21): gcc-4.8.5-28.el7_5.1.x86_64.rpm                                                                                     |  16 MB  00:00:00
(9/21): libnvpair1-0.7.9-1.el7_5.x86_64.rpm                                                                                 |  30 kB  00:00:00
(10/21): libuutil1-0.7.9-1.el7_5.x86_64.rpm                                                                                 |  35 kB  00:00:00
(11/21): lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm                                                          |  41 kB  00:00:00
(12/21): mpfr-3.1.1-4.el7.x86_64.rpm                                                                                        | 203 kB  00:00:00
(13/21): kernel-devel-3.10.0-862.3.3.el7.x86_64.rpm                                                                         |  16 MB  00:00:01
(14/21): libzfs2-0.7.9-1.el7_5.x86_64.rpm                                                                                   | 130 kB  00:00:00
(15/21): spl-0.7.9-1.el7_5.x86_64.rpm                                                                                       |  29 kB  00:00:00
(16/21): sysstat-10.1.5-13.el7.x86_64.rpm                                                                                   | 310 kB  00:00:00
(17/21): libzpool2-0.7.9-1.el7_5.x86_64.rpm                                                                                 | 591 kB  00:00:01
(18/21): zfs-0.7.9-1.el7_5.x86_64.rpm                                                                                       | 413 kB  00:00:00
(19/21): zlib-devel-1.2.7-17.el7.x86_64.rpm                                                                                 |  50 kB  00:00:00
(20/21): spl-dkms-0.7.9-1.el7_5.noarch.rpm                                                                                  | 456 kB  00:00:01
(21/21): zfs-dkms-0.7.9-1.el7_5.noarch.rpm                                                                                  | 4.9 MB  00:00:01
---------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                               12 MB/s |  54 MB  00:00:04
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libuutil1-0.7.9-1.el7_5.x86_64                                                                                                 1/21
  Installing : libnvpair1-0.7.9-1.el7_5.x86_64                                                                                                2/21
  Installing : mpfr-3.1.1-4.el7.x86_64                                                                                                        3/21
  Installing : kernel-devel-3.10.0-862.3.3.el7.x86_64                                                                                         4/21
  Installing : libmpc-1.0.1-3.el7.x86_64                                                                                                      5/21
  Installing : libzpool2-0.7.9-1.el7_5.x86_64                                                                                                 6/21
  Installing : libzfs2-0.7.9-1.el7_5.x86_64                                                                                                   7/21
  Installing : cpp-4.8.5-28.el7_5.1.x86_64                                                                                                    8/21
  Installing : lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64                                                                          9/21
  Installing : sysstat-10.1.5-13.el7.x86_64                                                                                                  10/21
  Installing : kernel-headers-3.10.0-862.3.3.el7.x86_64                                                                                      11/21
  Installing : glibc-headers-2.17-222.el7.x86_64                                                                                             12/21
  Installing : glibc-devel-2.17-222.el7.x86_64                                                                                               13/21
  Installing : gcc-4.8.5-28.el7_5.1.x86_64                                                                                                   14/21
  Installing : zlib-devel-1.2.7-17.el7.x86_64                                                                                                15/21
  Installing : elfutils-libelf-devel-0.170-4.el7.x86_64                                                                                      16/21
  Installing : dkms-2.6.1-1.el7.noarch                                                                                                       17/21
  Installing : spl-dkms-0.7.9-1.el7_5.noarch                                                                                                 18/21
Loading new spl-0.7.9 DKMS files...
Building for 3.10.0-693.el7.x86_64
Module build for kernel 3.10.0-693.el7.x86_64 was skipped since the
kernel headers for this kernel does not seem to be installed.
  Installing : spl-0.7.9-1.el7_5.x86_64                                                                                                      19/21
  Installing : zfs-dkms-0.7.9-1.el7_5.noarch                                                                                                 20/21
Loading new zfs-0.7.9 DKMS files...
Building for 3.10.0-693.el7.x86_64
Module build for kernel 3.10.0-693.el7.x86_64 was skipped since the
kernel headers for this kernel does not seem to be installed.
  Installing : zfs-0.7.9-1.el7_5.x86_64                                                                                                      21/21
  Verifying  : kernel-devel-3.10.0-862.3.3.el7.x86_64                                                                                         1/21
  Verifying  : spl-dkms-0.7.9-1.el7_5.noarch                                                                                                  2/21
  Verifying  : zlib-devel-1.2.7-17.el7.x86_64                                                                                                 3/21
  Verifying  : glibc-headers-2.17-222.el7.x86_64                                                                                              4/21
  Verifying  : zfs-0.7.9-1.el7_5.x86_64                                                                                                       5/21
  Verifying  : glibc-devel-2.17-222.el7.x86_64                                                                                                6/21
  Verifying  : spl-0.7.9-1.el7_5.x86_64                                                                                                       7/21
  Verifying  : libzfs2-0.7.9-1.el7_5.x86_64                                                                                                   8/21
  Verifying  : kernel-headers-3.10.0-862.3.3.el7.x86_64                                                                                       9/21
  Verifying  : gcc-4.8.5-28.el7_5.1.x86_64                                                                                                   10/21
  Verifying  : cpp-4.8.5-28.el7_5.1.x86_64                                                                                                   11/21
  Verifying  : elfutils-libelf-devel-0.170-4.el7.x86_64                                                                                      12/21
  Verifying  : sysstat-10.1.5-13.el7.x86_64                                                                                                  13/21
  Verifying  : libuutil1-0.7.9-1.el7_5.x86_64                                                                                                14/21
  Verifying  : mpfr-3.1.1-4.el7.x86_64                                                                                                       15/21
  Verifying  : zfs-dkms-0.7.9-1.el7_5.noarch                                                                                                 16/21
  Verifying  : libzpool2-0.7.9-1.el7_5.x86_64                                                                                                17/21
  Verifying  : lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64                                                                         18/21
  Verifying  : libnvpair1-0.7.9-1.el7_5.x86_64                                                                                               19/21
  Verifying  : dkms-2.6.1-1.el7.noarch                                                                                                       20/21
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                                                                                     21/21

Installed:
  zfs.x86_64 0:0.7.9-1.el7_5

Dependency Installed:
  cpp.x86_64 0:4.8.5-28.el7_5.1              dkms.noarch 0:2.6.1-1.el7                                 elfutils-libelf-devel.x86_64 0:0.170-4.el7
  gcc.x86_64 0:4.8.5-28.el7_5.1              glibc-devel.x86_64 0:2.17-222.el7                         glibc-headers.x86_64 0:2.17-222.el7
  kernel-devel.x86_64 0:3.10.0-862.3.3.el7   kernel-headers.x86_64 0:3.10.0-862.3.3.el7                libmpc.x86_64 0:1.0.1-3.el7
  libnvpair1.x86_64 0:0.7.9-1.el7_5          libuutil1.x86_64 0:0.7.9-1.el7_5                          libzfs2.x86_64 0:0.7.9-1.el7_5
  libzpool2.x86_64 0:0.7.9-1.el7_5           lm_sensors-libs.x86_64 0:3.4.0-4.20160601gitf9185e5.el7   mpfr.x86_64 0:3.1.1-4.el7
  spl.x86_64 0:0.7.9-1.el7_5                 spl-dkms.noarch 0:0.7.9-1.el7_5                           sysstat.x86_64 0:10.1.5-13.el7
  zfs-dkms.noarch 0:0.7.9-1.el7_5            zlib-devel.x86_64 0:1.2.7-17.el7

Complete!

# which zpool
/usr/sbin/zpool

入った

[root@localhost ~]# modprobe zfs
modprobe: FATAL: Module zfs not found.

入ってなかった

なんかごちゃごちゃいじってたら動いた…
この辺見てた
FPGAで遊ぶ [CentOS]ZFSインストール成功(7.2) http://bobgosso.blog13.fc2.com/blog-entry-547.html

CentOS7.4 で ZFS な iSCSI ターゲットを作成する – Qiita https://qiita.com/AnaKutsu/items/4094cadbab1bb0596967
多分こんな感じ

#yum groupinstall "Development tools"
#yum --enablerepo=epel reinstall zfs
#reboot
# modprobe zfs
modprobe: FATAL: Module zfs not found.
#yum --enablerepo=epel reinstall zfs
# zpool list
The ZFS modules are not loaded.

# modprobe zfs

# zpool list
no pools available
[root@storage02 ~]# zpool list
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
[root@storage02 ~]# /sbin/modprobe zfs
[root@storage02 ~]# cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   ramfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cpuset
nodev   tmpfs
nodev   devtmpfs
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   dax
nodev   pipefs
nodev   anon_inodefs
nodev   configfs
nodev   devpts
nodev   hugetlbfs
nodev   autofs
nodev   pstore
nodev   mqueue
nodev   selinuxfs
        xfs
nodev   binfmt_misc
nodev   zfs

プール作成

[root@storage02 ~]# zpool create tank raidz /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde

見る

[root@storage02 ~]# zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sda     ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdc     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sde     ONLINE       0     0     0

errors: No known data errors
[root@storage02 ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   33G  1.6G   31G   5% /
devtmpfs                 1.8G     0  1.8G   0% /dev
tmpfs                    1.9G     0  1.9G   0% /dev/shm
tmpfs                    1.9G  8.8M  1.9G   1% /run
tmpfs                    1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdf1               1014M  181M  834M  18% /boot
tmpfs                    371M     0  371M   0% /run/user/0
tank                      11T  128K   11T   1% /tank

めでたしめでたし

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です