Skip to content

Instantly share code, notes, and snippets.

@yerden
Created July 29, 2018 20:42
Show Gist options
  • Save yerden/dcd523d27935a1f657a9cb23226080aa to your computer and use it in GitHub Desktop.
Save yerden/dcd523d27935a1f657a9cb23226080aa to your computer and use it in GitHub Desktop.
ZFS howto

Steps

  • Install zfs-release to attach ZFS repo for yum.
sudo yum install http://download.zfsonlinux.org/epel/zfs-release.el7_5.noarch.rpm

Be sure to match the version of Centos.

  • Choose between kABI and DKMS installation styles. kABI is preferable since it doesn't require to recompile. Edit /etc/yum.repos.d/zfs.repo to enable repository zfs-kmod and disable others.
  • Install ZFS with sudo yum install zfs.
  • Load modules on startup sudo sh -c 'echo zfs > /etc/modules-load.d/zfs.conf'.
  • Create pool with sudo zpool create mypool raidz sdb sdc. Here mypool is the name of the pool, raidz type of root vdev, sdb and sdc are device to add to pool. mypool will be mounted to /mypool. This can be configured with -m switch to zpool.
  • Alternatively, you can mount pre-existing pools with zpool import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment