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

[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

めでたしめでたし

どのSATAポートに繋げたHDDがどこにマウントされてるか調べる方法

最初に全部入れると、どこのSATAポートがどのHDDかいつも忘れるれるのでメモ

インストール

#yum -y install smartmontools

何がマウントされてるか確認

[root@localhost ~]# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device

# smartctl /dev/sda -i
# smartctl /dev/sdb -i
# smartctl /dev/sdc -i
# smartctl /dev/sdd -i
# smartctl /dev/sde -i

sdbに何のHDDが刺さってるか確認
Device ModelとかSerial NumberをHDDに書いてあるシール?と照らし合わせる

# smartctl /dev/sdb -i
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-693.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" MD04ACA... Enterprise HDD
Device Model:     TOSHIBA MD04ACA300
Serial Number:    にゃーん
LU WWN Device Id: にゃーん?
Firmware Version: FP1A
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Jun 25 22:37:08 2018 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

あとは適当にHDD(物理)にマウントポイントをメモ書きしとく

本来SMARTを調べるコマンドなのでもうちょっと使いこなしたい…

centos7にnodejs8を入れようとして入らなかった

入ってないのを確認

[root@10 ~]# yum remove -y nodejs npm
Loaded plugins: fastestmirror
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration
No Match for argument: nodejs
No Match for argument: npm
No Packages marked for removal

インストール

[root@10 ~]# curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

## Installing the NodeSource Node.js 8.x repo...


## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m

## Confirming "el7-x86_64" is supported...

+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.KfgLZx2d66' 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.KfgLZx2d66'

## Cleaning up...

+ rm -f '/tmp/tmp.KfgLZx2d66'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `yum install -y nodejs` (as root) to install Node.js 8.x and npm.
## You may also need development tools to build native addons:
##   `yum install -y gcc-c++ make`


[root@10 ~]# yum install -y nodejs
Loaded plugins: fastestmirror
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:6.13.0-1nodesource will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package      Arch         Version                       Repository        Size
================================================================================
Installing:
 nodejs       x86_64       2:6.13.0-1nodesource          nodesource        13 M

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

Total download size: 13 M
Installed size: 38 M
Downloading packages:
nodejs-6.13.0-1nodesource.x86_64.rpm                       |  13 MB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:nodejs-6.13.0-1nodesource.x86_64                           1/1
  Verifying  : 2:nodejs-6.13.0-1nodesource.x86_64                           1/1

Installed:
  nodejs.x86_64 2:6.13.0-1nodesource

Complete!
[root@10 ~]# node -v
v6.13.0

えぇ。。。

cninachu γから録画したものだけが画像が乱れる

結果論から言うとHDDを替えたら治った。
原因は不明

再発した

とりあえず、書き出しだけ

cninachu γのWEB UIから録画したものだけ画像が乱れる
rec

こんな感じ、ノイズが酷い後音も飛ぶ

recpt1 --strip -b25 27 10 test.ts
rivarun --b25 --sid 1056 --ch GR/21 15 test.ts
rivarun --b25 --mirakurun localhost:40772 --sid 1024 --ch GR/27 15 test2.ts

上記コマンドは綺麗に再生出来た

切り分けの方法が分からぬ

「disk io が足りてないのかも」と言われたのでそのうち確認してみる

構成
FUJITSU Server PRIMERGY TX1310 M1
PT3*2
350GB HDD
3T HDD




					

cninachu γでTOKYO MXや千葉テレビが受信できない

未解決
ケーブル変えたら治った
テスト用に使ったケーブル(10mくらい)が原因

ビフォー

[root@10 ~]# checksignal --device /dev/pt3video7 16
device = /dev/pt3video7
C/N = 9.582304dB

アフター

[root@10 ~]# checksignal --device /dev/pt3video2 16
device = /dev/pt3video2
C/N = 33.454903dB^C

Mirakurunのインストール手順(Ubuntu・Debian・CentOS)


ここにも同じような人が居た

[root@10 ~]#  npm list --depth=0 -g
/usr/lib
tqq arib-b25-stream-test@0.2.9
tqq mirakurun@2.5.7
tqq npm@3.10.10
tqq pm2@2.8.0
mqq rivarun@1.2.0
[root@10 ~]# rivarun --list | sed 's/},/},\n/g'
status: 200
headers: {"server":"Mirakurun/2.5.7","content-type":"application/json; charset=utf-8","date":"Tue, 05 Dec 2017 16:44:43 GMT","connection":"close","content-length":"2763"}
[{"type":"GR","channel":"27","name":"NHK総合・東京","services":[{"id":3273601024,"serviceId":1024,"networkId":32736,"name":"NHK総合1・東京"},
{"id":3273601025,"serviceId":1025,"networkId":32736,"name":"NHK総合2・東京"},
{"id":3273601408,"serviceId":1408,"networkId":32736,"name":"NHK携帯G・東京"}]},
{"type":"GR","channel":"26","name":"NHK Eテレ東京","services":[{"id":3273701032,"serviceId":1032,"networkId":32737,"name":"NHKEテレ1東京"},
{"id":3273701033,"serviceId":1033,"networkId":32737,"name":"NHKEテレ2東京"},
{"id":3273701034,"serviceId":1034,"networkId":32737,"name":"NHKEテレ3東京"},
{"id":3273701416,"serviceId":1416,"networkId":32737,"name":"NHK携帯2"}]},
{"type":"GR","channel":"25","name":"日本テレビ","services":[{"id":3273801040,"serviceId":1040,"networkId":32738,"name":"日テレ1"},
{"id":3273801041,"serviceId":1041,"networkId":32738,"name":"日テレ2"},
{"id":3273801424,"serviceId":1424,"networkId":32738,"name":"日本テレビ"}]},
{"type":"GR","channel":"24","name":"テレビ朝日","services":[{"id":3274101064,"serviceId":1064,"networkId":32741,"name":"テレビ朝日"},
{"id":3274101065,"serviceId":1065,"networkId":32741,"name":"テレビ朝日"},
{"id":3274101066,"serviceId":1066,"networkId":32741,"name":"テレビ朝日"},
{"id":3274101448,"serviceId":1448,"networkId":32741,"name":"テレビ朝日"}]},
{"type":"GR","channel":"22","name":"TBS","services":[{"id":3273901048,"serviceId":1048,"networkId":32739,"name":"TBS1"},
{"id":3273901049,"serviceId":1049,"networkId":32739,"name":"TBS2"},
{"id":3273901432,"serviceId":1432,"networkId":32739,"name":"TBS"},
{"id":3273901183,"serviceId":1183,"networkId":32739,"name":"Gガイド"}]},
{"type":"GR","channel":"23","name":"テレビ東京","services":[{"id":3274201072,"serviceId":1072,"networkId":32742,"name":"テレビ東京1"},
{"id":3274201073,"serviceId":1073,"networkId":32742,"name":"テレビ東京2"},
{"id":3274201074,"serviceId":1074,"networkId":32742,"name":"テレビ東京3"},
{"id":3274201456,"serviceId":1456,"networkId":32742,"name":"テレビ東京携帯"}]},
{"type":"GR","channel":"21","name":"フジテレビジョン","services":[{"id":3274001056,"serviceId":1056,"networkId":32740,"name":"フジテレビ"},
{"id":3274001057,"serviceId":1057,"networkId":32740,"name":"フジテレビ"},
{"id":3274001058,"serviceId":1058,"networkId":32740,"name":"フジテレビ"},
{"id":3274001440,"serviceId":1440,"networkId":32740,"name":"フジテレビ"}]},
{"type":"GR","channel":"16","name":"TOKYO MX","services":[]},
{"type":"GR","channel":"28","name":"放送大学","services":[]},
{"type":"GR","channel":"30","name":"千葉テレビ","services":[]}]
[root@10 ~]# rivarun --list | sed 's/},/},\n/g'  | grep -v serviceId
status: 200
headers: {"server":"Mirakurun/2.5.7","content-type":"application/json; charset=utf-8","date":"Tue, 05 Dec 2017 16:45:28 GMT","connection":"close","content-length":"2763"}
{"type":"GR","channel":"16","name":"TOKYO MX","services":[]},
{"type":"GR","channel":"28","name":"放送大学","services":[]},
{"type":"GR","channel":"30","name":"千葉テレビ","services":[]}]

TOKYO MXの受信感度がかなり悪い。何でだろう

0|mirakuru | 2017-12-06T22:36:24.125+09:00 info: ChannelItem#'放送大学' service scan has started
0|mirakuru | 2017-12-06T22:36:24.126+09:00 info: TSFilter has created (serviceId=null, eventId=null)
0|mirakuru | 2017-12-06T22:36:24.137+09:00 info: TunerDevice#4 process has spawned by command `recpt1 --device /dev/pt3video6 28 - -` (pid=11704)
0|mirakuru | 2017-12-06T22:36:24.137+09:00 info: TunerDevice#4 streaming to user `Mirakurun:getServices()` (priority=-1)
0|mirakuru | 2017-12-06T22:36:24.139+09:00 info: TunerDevice#4 > using device: /dev/pt3video6
0|mirakuru | pid = 11704
0|mirakuru | 2017-12-06T22:36:24.969+09:00 info: TunerDevice#4 > device = /dev/pt3video6
0|mirakuru | 2017-12-06T22:36:24.971+09:00 info: TunerDevice#4 > C/N = -nandB
0|mirakuru | 2017-12-06T22:36:24.972+09:00 info: TunerDevice#4 > Recording...
0|mirakuru | 2017-12-06T22:36:44.138+09:00 info: TSFilter has closed (serviceId=null, eventId=null)
0|mirakuru | 2017-12-06T22:36:44.138+09:00 info: TunerDevice#4 end streaming to user `Mirakurun:getServices()` (priority=-1)
0|mirakuru | 2017-12-06T22:36:44.138+09:00 warn: ChannelItem#'放送大学' service scan has failed [Error: stream has closed before get network]
0|mirakuru | 2017-12-06T22:36:44.138+09:00 info: ChannelItem#'TOKYO MX' service scan has started
0|mirakuru | 2017-12-06T22:36:44.139+09:00 info: TSFilter has created (serviceId=null, eventId=null)
0|mirakuru | 2017-12-06T22:36:44.150+09:00 info: TunerDevice#5 process has spawned by command `recpt1 --device /dev/pt3video7 16 - -` (pid=11712)
0|mirakuru | 2017-12-06T22:36:44.150+09:00 info: TunerDevice#5 streaming to user `Mirakurun:getServices()` (priority=-1)
0|mirakuru | 2017-12-06T22:36:44.152+09:00 info: TunerDevice#5 > using device: /dev/pt3video7
0|mirakuru | 2017-12-06T22:36:44.152+09:00 info: TunerDevice#5 > pid = 11712
0|mirakuru | 2017-12-06T22:36:45.027+09:00 info: TunerDevice#5 > device = /dev/pt3video7
0|mirakuru | 2017-12-06T22:36:45.029+09:00 info: TunerDevice#5 > C/N = 10.088181dB
0|mirakuru | 2017-12-06T22:36:45.030+09:00 info: TunerDevice#5 > Recording...
0|mirakuru | 2017-12-06T22:36:47.138+09:00 info: TunerDevice#4 > SIGTERM received. cleaning up...
0|mirakuru | 2017-12-06T22:36:47.138+09:00 info: TunerDevice#4 > Recorded 23sec
0|mirakuru | 2017-12-06T22:36:47.820+09:00 info: TunerDevice#4 process has closed with exit code=0 by signal `null` (pid=11704)
0|mirakuru | 2017-12-06T22:37:04.150+09:00 info: TSFilter has closed (serviceId=null, eventId=null)
0|mirakuru | 2017-12-06T22:37:04.151+09:00 info: TunerDevice#5 end streaming to user `Mirakurun:getServices()` (priority=-1)
0|mirakuru | 2017-12-06T22:37:04.152+09:00 warn: ChannelItem#'TOKYO MX' service scan has failed [Error: stream has closed before get network]
^C
[root@10 ~]# recpt1 --strip -b25 16 10 test.ts
enable B25 strip
using B25...
recpt1: invalid option -- '2'
recpt1: invalid option -- '5'
pid = 11726
C/N = 9.632417dB
Recording...
b25->put failed
b25_decode failed (code=-4). fall back to encrypted recording.
Recorded 11sec

[root@10 ~]# checksignal --device /dev/pt3video7 16
device = /dev/pt3video7
C/N = 9.582304dB

CentOS7にPT3とSoftCasとその他もろもろ入れるメモ

Fujitsu PRIMERGY TX1310M1 が安く手に入ったので録画サーバーをリプレースしたのでその時のメモ
基本的にはここ参考に録画サーバ構築の前準備(CentOS 7編)、Chinachu・epgrec UNA対応 | 自分に負けないラボラトリー

入れたてのCentOS7でmakeが通らないのでメモ
yumで色々入れとけばmakeは通る。
不要な物もあるかも

yum -y install git kernel-devel-`uname -r` git unzip bzip2 wget gcc gcc-c++ kernel-devel vim wget unzip bzip2 make autogen automake kernel-devel patch perl-ExtUtils-MakeMaker libtool openssl-devel libboost-all-dev boost-devel cmake pcsc-lite pcsc-lite-devel  pcsc-lite-libs

PT3ドライバ、arib25ライブラリ、recpt1コマンドを参考に

SoftCasはLinuxでSoftCasは使用できるのか? ~CentOS 7編~ | 俺的備忘録 〜なんかいろいろ〜を参考に

下記コマンドを入力するが

# wget http://www.wazoku.net/softcas.zip
# unzip softcas.zip
# cd softcas
# wget -O winscard.cpp https://pastebin.com/raw/5144Ah9g
# wget -O Makefile https://pastebin.com/raw/FQdSixkB

makeするとKeys.hがないと言われる

# make
g++  -g -fPIC -O2 -I /usr/include/PCSC  -c -o winscard.o winscard.cpp
winscard.cpp:12:18: fatal error: Keys.h: No such file or directory
 #include "Keys.h"
                  ^
compilation terminated.
make: *** [winscard.o] Error 1

配布ファイルが変更されていて一発でmakeが通らなくなっている。
自分は心が折れて昔の録画サーバーからソースコードを取ってきた。

ソースコードの一文をググるとこの辺がヒットするので参考になるかも

下のファイルが有ればコンパイル出来る

-rw-r--r--. 1 root root 13209 Dec  3 21:40 Crypto.cpp
-rw-r--r--. 1 root root   296 Dec  3 21:40 Crypto.h
-rw-r--r--. 1 root root 34136 Dec  3 21:40 Crypto.o
-rw-r--r--. 1 root root  1917 Dec  3 21:40 Decoder-ECM.cpp
-rw-r--r--. 1 root root  8504 Dec  3 21:41 Decoder-ECM.o
-rw-r--r--. 1 root root   331 Dec  3 21:40 Decoder.h
-rw-r--r--. 1 root root   410 Dec  3 21:40 Global.h
-rw-r--r--. 1 root root  1831 Dec  3 21:40 Keys.cpp
-rw-r--r--. 1 root root  1084 Dec  3 21:40 Keyset.cpp
-rw-r--r--. 1 root root   484 Dec  3 21:40 Keyset.h
-rw-r--r--. 1 root root 14600 Dec  3 21:40 Keyset.o
-rw-r--r--. 1 root root   444 Dec  3 21:40 Keys.h
-rw-r--r--. 1 root root  7248 Dec  3 21:40 Keys.o
-rwxr-xr-x. 1 root root 57728 Dec  3 21:41 libpcsclite.so.1.0.0
-rw-r--r--. 1 root root   364 Dec  3 21:40 Makefile
-rw-r--r--. 1 root root  1235 Dec  3 21:40 softcas.sln
-rw-r--r--. 1 root root  7262 Dec  3 21:40 softcas.vcxproj
-rw-r--r--. 1 root root  1429 Dec  3 21:40 softcas.vcxproj.filters
drwxr-xr-x. 2 root root    26 Dec  3 21:40 Win32
-rw-r--r--. 1 root root  3517 Dec  3 21:40 winscard.cpp
-rw-r--r--. 1 root root 14400 Dec  3 21:40 winscard.o
drwxr-xr-x. 2 root root    26 Dec  3 21:40 x64

物が揃えば下記コマンドで出来る

# make
# cp libpcsclite.so.1.0.0 /usr/lib64/

超個人的ZFSメモ(HDD追加)

HDD追加した際のメモ

root@storage:~# cat /proc/version
Linux version 4.4.0-38-generic (buildd@lgw01-58) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016

接続してるHDD一覧

ls /dev/disk/by-id/ | grep ata-

HDD接続後
増えた名前が新しく追加されたHDD

ls /dev/disk/by-id/ | grep ata-

そのままaddすると怒られる

root@storage:~#  zpool add tank /dev/disk/by-id/ata-TOSHIBA_XXXXXXXXXXXXXXXX
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/ata-TOSHIBA_XXXXXXXXXX does not contain an EFI label but it may contain partition
information in the MBR.

partedでgptラベルを付ける

root@storage:~# parted /dev/disk/by-id/ata-TOSHIBA_XXXXXXXXX
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to
continue?
Yes/No? yes
(parted) quit
Information: You may need to update /etc/fstab.

zpool add する

root@storage:~#  zpool add tank /dev/disk/by-id/ata-TOSHIBA_XXXXX

増えてる

root@storage:~# zpool status tank
  pool: tank
 state: ONLINE
  scan: none requested

めでたしめでたし

結論:ZFSすごい

参考リンク
http://sios-oss.blogspot.jp/2012/03/zfs-on-linux1zfs.html
http://qiita.com/kotashiratsuka/items/18d09bd7a7de4c2a15b9

Activité Pop と wena を比較してみた

Withings Activité Pop と wena を比較してみました
wena買ってた
Activité Pop買ってた

結論から言うと、個人的にはWithings Activité Popが良いかなと言う気がします。


activite pop wena(Quartz Chronograph)
電池の持ち ■8ヶ月(電池式) □一週間(充電式)(ベルト部)/ 5年(時計部)
重量 ■37g □358g
防水 ■5 気圧防水 □3 気圧防水
機能 □歩数 / 消費カロリー / 移動距離 / 睡眠 ■歩数 / 消費カロリー / 移動距離 / 通知機能 / 電子マネー機能(おサイフリンクアプリ必須) /
ベルト □ゴム(劣化しやすい) ■ステンレス製
価格 □20,800 ■64,584
以下個人な比較
見やすさ ■(暗い所でも見やすい) □(暗い所だと見えない) 見やすさ大切
アプリの完成度 ■見やすい。バグ無し □見づらい。バグあり?時間毎の歩数が出ない(再インストールすれば治るかも?) wenaアプリは完成度がちょっと低い(気がする)
デザイン性 □(ゴムのため) ■(シルバーのため) wenaはシルバーなので、どんな服装にも合う
機能 ■睡眠機能。歩数もスマフォを使わずに分かる □世の中もっとコインレスが流行ればアリ?。(大体スマフォとセットでSuica持ってるのでそんなに困らない事に気づいてしまった) 大体機能は同じ。睡眠機能を取るか支払い機能を取るか
振動 □有って無いような物。使い物にならない ■強い

結果:
睡眠機能を取るならactivite (pop)
支払い機能を取るならwena
その他性能はだいたい同じ
どっちも、良い所・悪い所が間逆すぎて…
見た目はwenaで時計部分はactivite とか(2つ付ければ完璧?
wenaの時計交換すると保証対象外になるのが残念…

安くていいならactivite pop オススメします
高くても良くて新しいのが良いならwenaですかね(自慢できるし)
 
冒頭に書いたように個人的にはactivite popが良いです
(合体すれば一番良いんですけど!)