There are a couple of options for ZFS on Linux. The user space option, ZFS-fuse, and the kernel mode option, ZFS on Linux. Here we will describe installing the kernel mode ZFS on Linux.
I’m starting with a base install of CentOS 6.3 so the first we need is the Development tools so we can compile the source RPMs.
yum groupinstall “Development Tools”
Next we’ll install some additional dependencies
yum install rpm-build kernel-devel zlib-devel libuuid-devel libblkid-devel libselinux-devel e2fsprogs-devel parted lsscsi
Download the latest from zfsonlinux
wget https://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc12.src.rpmwget https://github.com/downloads/zfsonlinux/zfs/zfs-modules-0.6.0-rc12.src.rpmwget https://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc12.src.rpmwget https://github.com/downloads/zfsonlinux/spl/spl-modules-0.6.0-rc12.src.rpm
Build the SPL RPMs
rpmbuild –rebuild spl-modules-0.6.0-rc12.src.rpmrpmbuild –rebuild spl-0.6.0-rc12.src.rpm
Building the ZFS RPMs has a dependency on the SPLs so we install them first
yum install rpmbuild/RPMS/x86_64/spl*.rpm
Now we can build the ZFS RPMs
rpmbuild –rebuild zfs-modules-0.6.0-rc12.src.rpmrpmbuild –rebuild zfs-0.6.0-rc12.src.rpm
Install the ZFS RPMs
yum install rpmbuild/RPMS/x86_64/zfs*.rpm
On my install, a new kernel was installed as a dependency so a reboot is needed
reboot
otherwise you could just do
modprobe zfs
Verify ZFS is installed
lsmod | grep zfs
Thanks for the great article! It made what could have been a very difficult process pretty easy. For anyone else who is reading that may have problems with rpmbuild, make sure you use 2 dashes for the rebuild option. 1 will not work.
Pingback: Help setting up raid 0 xbmcubuntu