How to install ZFSonLinux (DKMS) on Arch. Using the Dynamic Kernel Module Support version means the ZFS modules will be rebuilt automatically after every kernel upgrade. See the steps in the Upgrading section if this automatic build fails.
Much like the Build Arch Packages guide, we'll need the base-devel group to build the packages required for ZFS.
pacman -S base-devel git
DO NOT PERFORM THESE STEPS AS ROOT. Building packages as root could lead to unforseen consequences.
First we'll need the Solaris Porting Layer kernel modules so ZFS has what it needs to operate. Grab the DKMS version.
mkdir -p ~/build/ cd ~/build/ git clone https://aur.archlinux.org/spl-dkms.git cd spl-dkms makepkg -si
This will build and install the latest versions of the spl-dkms and spl-utils packages.
Now that SPL is in place we can install ZFS. Grab the DKMS version.
cd ~/build/ git clone https://aur.archlinux.org/zfs-dkms.git cd zfs-dkms makepkg -si
This will build and install the latest versions of the zfs-dkms and zfs-utils packages.
Minor kernel updates shouldn't require a rebuild of ZFS or SPL packages. In cases where it is required though, uninstall the packages first.
sudo pacman -R spl-dkms spl-utils zfs-dkms zfs-utils
Then upgrade the system
sudo pacman -Syu
Then go through the Install steps listed above.