ZFS License and Legal Considerations
ZFS, originally developed by Sun Microsystems and now part of the OpenZFS project, offers powerful features such as advanced file system capabilities, data integrity protections, and integrated volume management. However, its licensing presents unique challenges and considerations, particularly for those wishing to integrate it into other operating systems or distribute it with their software.
ZFS Licensing Overview
ZFS is licensed under the Common Development and Distribution License (CDDL), an open-source license created by Sun Microsystems. The CDDL is a permissive, open-source license that allows the code to be freely used, modified, and distributed, as long as modifications to the code are released under the same license. However, there are several key aspects of the CDDL that impact how ZFS can be distributed and integrated into other software:
File-Level Copyleft: The CDDL has a file-level copyleft requirement. This means that if a file is modified, the modified version must also be distributed under the CDDL. However, this requirement only applies to individual files, so code that merely interacts with ZFS (without modifying ZFS source files) does not need to be released under the CDDL.
License Compatibility Issues with GPL: One of the major legal considerations surrounding ZFS is its license incompatibility with the GNU General Public License (GPL), which governs many Linux distributions, including the Linux kernel. The GPL requires that derivative works of GPL-licensed software must also be licensed under the GPL, and the CDDL is not considered compatible with the GPL due to differences in how the licenses handle derivative works. As a result, ZFS cannot be integrated directly into the Linux kernel without violating the GPL’s terms.
ZFS on Linux
Despite the license incompatibility, ZFS can still be used with Linux systems through several methods that avoid direct integration into the Linux kernel:
Out-of-Tree Module: The most common method of using ZFS on Linux is by distributing it as an out-of-tree kernel module. This means that ZFS is not included in the Linux kernel itself but is compiled and loaded separately. This approach avoids the licensing conflict, as the Linux kernel remains under the GPL, and ZFS is loaded as a separate module. Distributions such as Ubuntu provide support for installing ZFS as an external module without directly bundling it with the kernel.
User-Space Integration: Another method to use ZFS on Linux is through user-space integration. The user-space tools and utilities required for managing ZFS pools and datasets can operate independently from the Linux kernel, again avoiding license conflicts. This method allows administrators to use ZFS without modifying or linking it directly to GPL-licensed code.
ZFS on Linux (ZoL) Project: The ZFS on Linux (ZoL) project, which is now part of the OpenZFS project, has provided a way for ZFS to run on Linux without violating the GPL. ZoL has become the primary way to run ZFS on Linux, and many Linux distributions offer it as an option. However, users must install it separately, as Linux distributions governed by GPL cannot include ZFS by default.
ZFS in FreeBSD and Other Operating Systems
FreeBSD, unlike Linux, does not have licensing issues with ZFS. FreeBSD’s kernel and the ZFS file system are both open-source but are governed by permissive licenses (BSD for the kernel and CDDL for ZFS). This compatibility allows ZFS to be fully integrated into FreeBSD’s base system without any legal conflicts. As a result, FreeBSD is often considered one of the best platforms for using ZFS, with full support and integration out of the box.
In addition to FreeBSD, ZFS can also be used on other platforms, such as Illumos (the successor to OpenSolaris, where ZFS was first developed) and macOS (through third-party projects like OpenZFS on macOS).
Redistributing ZFS
When redistributing software that includes ZFS, developers need to be aware of the following legal considerations:
CDDL Compliance: Any redistribution of ZFS, including modifications, must comply with the CDDL’s terms. This means that if a developer modifies ZFS source code, they must release those modifications under the CDDL. The original ZFS source code cannot be relicensed under the GPL or other licenses that are incompatible with the CDDL.
Integration with GPL Software: Developers wishing to integrate ZFS with GPL-licensed software must take steps to avoid legal conflicts. This typically means distributing ZFS separately from the GPL-licensed components or using ZFS as an out-of-tree module to maintain separation between the licenses.
Commercial Use: The CDDL does not impose restrictions on the commercial use of ZFS. This means that ZFS can be used and distributed in commercial products as long as the terms of the CDDL are followed, including releasing any modifications to ZFS under the same license.
ZFS and Oracle’s Licensing
Although ZFS is developed and maintained by the OpenZFS community, Oracle holds the intellectual property for the original ZFS implementation from Sun Microsystems. Oracle maintains its own version of ZFS, which is part of its proprietary Oracle Solaris operating system. This version of ZFS is not open-source, and Oracle does not contribute to the OpenZFS project. Therefore, developers using ZFS should ensure they are using the OpenZFS implementation to avoid potential legal conflicts with Oracle’s proprietary code.