OpenZFS

Jump to: navigation, search

ZFS

ZFS is a combined file system and logical volume manager designed by Sun Microsystems. The features of ZFS include protection against data corruption, support for high storage capacities, integration of the concepts of filesystem and volume management, snapshots and copy-on-write clones, continuous integrity checking and automatic repair, RAID-Z and native NFSv4 ACLs, and can be very precisely configured. The two main implementations, by Oracle and by the OpenZFS project, are extremely similar, making ZFS widely available within Unix-like systems. (Wikipedia)

ZFS, OpenZFS and ZFS on Linux

ZFS was developed to be a next generation file system by Sun Microsystems. Oracle purchased Sun Microsystems and ZFS became closed source.

OpenZFS is a project started by many of the original ZFS developers to create an open source implementation of ZFS. It is strategically reducing existing platform related differences in order to ease sharing of source code by bringing together developers from the illumos, FreeBSD, Linux, macOS, NetBSD, and Windows platforms, and a wide range of companies that build products on top of OpenZFS.

ZFS on Linux (ZoL) is the implementation of OpenZFS designed to work in a Linux environment.

Hardware Considerations

Single Disk

ZFS can be used to format a single disk or partition to make use of ZFS's powerful snapshot and replication capabilities without benefeting of ZFS's data redundancy features. In this case ZFS requires little memory resources and runs with little overhead. It even runs fine on average laptops.

If you're going to use ZFS only on a single disk or partition in your openSUSE system to benefit of its snapshot and replication features you might want to consider using Btrfs instead since it's well integrated in openSUSE via Snapper, YaST Partitioner and YaST Filesystem Snapshots tools. More information can be found in the Snapper documentation.

RAID-Z

When using RAID-Z functionality for home and non critical use please note the following:

  • It is recommended to use ECC memory if your hardware supports it.
  • It is recommended to have at least 8 GB of memory in your system, preferably 1G of memory for every TB of data array capacity if the system will be under heavy use.
  • The disks of the data array should be of equal size and preferably the same make,model & batch.

For critical and enterprise customers please read the ZFS documentation for more information and best practices advice.

ZFS on Root

ZFS is currently best suited for data arrays. Using ZFS on root in a Linux system is still experimental, only Ubuntu recently introduced experimental root partition support in version 19.10. openSUSE does not yet support ZFS on root. A growing number of users successfully use Btrfs on root and use ZFS on data storage disks or arrays for the best of both worlds.

Installation

The ZFS packages are not available from the standard repositories. The "Filesystem Tools" repository maintained in [openSUSE Build Service] (OBS) contains ZFS as well as a lot of updated file systems relates packages. You can set the repository and install ZFS via the GUI or the command line.

On more recent systems, the zfs module is not compatible with secure boot, due to missing kernel signatures. Disabling secure boot typically allows you to load the modules.

Installation

Visit the ZFS download page on the openSUSE software portal and select your version of openSUSE. You will presented with the option to graphically install ZFS and it's repository or the option of manual installation.

The ZFS packages are maintained by the filesystem project and are not part of the official openSUSE project.

External Links

External Introductions and overviews

External Tutorials

ZFS Best Practices and Tuning

Known issues

modprobe: Key rejected by service

Symptom

# modprobe zfs
modprobe: ERROR: could not insert 'zfs': Key was rejected by service

Reason

The zfs module is not signed. A kernel in secure boot mode will therefore reject this module

Solution

Disable secure boot, if applicable.