OpenZFS

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
OpenZFS
Logo of the OpenZFS project
Written in C
Operating system illumos, FreeBSD, Linux, Mac OS X
License CDDL
Website open-zfs.org

OpenZFS is an umbrella project aimed at bringing together individuals and companies that use the ZFS file system and work on its improvements, aiming as well at making ZFS more widely used and developed in a true open-source manner.[1][2][3]

OpenZFS brings together developers from the illumos, Linux, FreeBSD, and macOS platforms, and a wide range of companies.[4][5] High-level goals of the project include raising awareness of the quality, utility and availability of open-source implementations of ZFS, encouraging open communication about ongoing efforts toward improving open-source variants of ZFS, and ensuring consistent reliability, functionality and performance of all distributions of ZFS.[6]

Illumos, which is derived from OpenSolaris, provides upstream source code for other ZFS implementations.[7] While there are various differences between the illumos ZFS codebase and other open-source implementations of ZFS,[8] OpenZFS is strategically reducing existing platform-related differences in order to ease sharing of the source code.

Founding members of OpenZFS include Matt Ahrens, one of the main architects of ZFS.[6]

History

The ZFS file system was originally developed by Sun Microsystems for the Solaris operating system. The ZFS source code was released in 2005 under the Common Development and Distribution License (CDDL) as part of the OpenSolaris operating system, and it was later ported to other operating systems and environments.[9][10]

As the FSF claimed a CDDL and GPL legal incompatibility in 2005, Sun's implementation of the ZFS file system wasn't used as a basis for the development of a Linux kernel module, it wasn't merged into the Linux kernel mainline, and Linux distributions did not include it as a precompiled kernel module.[11][12] As a workaround, FUSE, a framework that allows file systems to run in userspace, was used on Linux as a separation layer for which the licensing issues are not in effect, although with a set of its own issues that include performance penalty.[10][13] However, the April 2016 release of Ubuntu 16.04 LTS includes CDDL-licensed ZFS on Linux[14] as a kernel module that is maintained as a separate project, outside the Linux kernel mainline, claiming license compatibility.[15][16][17]

The following is a list of key events to the development of ZFS and its various implementations, leading to the creation of OpenZFS as an umbrella project:[9][18]:6,15

  • 2001: Closed-source development of ZFS started with two engineers at Sun Microsystems.
  • 2005: ZFS source code was released as part of OpenSolaris.
  • 2006: Development of a FUSE ZFS port for Linux started.
  • 2007: Apple started porting of ZFS to Mac OS X.
  • 2008: A port to FreeBSD was released as part of FreeBSD 7.0.
  • 2008: Development of a native ZFS Linux port started, known as ZFS on Linux.
  • 2009: Apple's ZFS project closed, and the MacZFS project continued to develop the code.
  • 2010: OpenSolaris was discontinued, resulting in the further development of ZFS on Solaris being no longer open-source.
  • 2010: illumos was forked from OpenSolaris as its open-source successor,[19][20] and continued to develop ZFS in the open. Ports of ZFS to other platforms continued pulling in upstream changes from illumos.
  • 2012: Feature flags were introduced to replace legacy on-disk version numbers, enabling easier distributed evolution of the ZFS on-disk format to support new features.
  • 2013: Coexisting with the stable version of MacZFS, its prototype generation (known as OpenZFS on OS X or O3X) uses ZFS on Linux as the new upstream codebase.[21][22]
  • 2013: The first stable release of ZFS on Linux.[23]
  • 2013: Official announcement of the OpenZFS as an umbrella project.[2][5] New features and fixes are regularly pulled into OpenZFS from illumos and pushed into all ports to other platforms, and vice versa.[9]
  • 2016: Ubuntu 16.04 includes the open-source ZFS file system variant by default

Pool versions and feature flags

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

Originally, version numbers of the pool and file system were incremented as new features were introduced, in order to designate the on-disk file system format and available features. This worked well when a single entity controlled the development of ZFS, and this versioning scheme is still in use with the ZFS in Oracle Solaris.[24][25]

In a more distributed development model, having a single version number is far from ideal as all implementations of OpenZFS would need to agree on all changes to the on-disk file system format. The solution selected by OpenZFS was to introduce feature flags as a new versioning system that tags on-disk format changes with unique names, and supports both completely independent format changes and format changes that depend on each other. A pool can be moved and used between OpenZFS implementations as long as all feature flags in use by the pool are supported by both implementations.[18]:20,26–27[26]:2–3[27]

OpenZFS uses pool version 5000 to indicate the use of feature flags; this pool version is an unchanging number that is expected to never conflict with version numbers used by Oracle's proprietary ZFS versions. Legacy version numbers still exist for pool versions 1–28, and are implied by the pool version 5000;[28] the initial proposal was to use 1000 as the pool version.[26]:4 Future on-disk format changes are enabled and disabled independently via feature flags.

Feature flags are exposed as pool properties, following these naming scheme rules:[26]:4

  • Format of the property name is feature@<org-name>:<feature-name>
  • <org-name> is the reverse DNS name of the organization that developed the feature, ensuring unique property names.
  • Property names can be shortened to feature@<feature-name> when they remain unambiguous.

For example, feature@com.foocompany:async_destroy is a valid property name, and it could be shortened to feature@async_destroy.[26]:4

Each pool feature can be in either disabled, enabled, or active state. Disabled features are those that will not be used, and no on-disk format changes will be made; as a result, such features are backward-compatible. Enabled features are those that will be used, no on-disk format changes have been made yet, but the software may make the changes at any time; such features are still backward-compatible. Active features are those that have made backward-incompatible on-disk format changes to the pool.[26]:5

When any pool feature is enabled, legacy version of the pool is automatically upgraded to 5000 and any other prerequisite features are also enabled. By default, new pools are created with all supported features enabled. In general, state of a feature can be changed from active back to enabled, undoing that way performed on-disk format changes and making the pool compatible again with an older OpenZFS implementation; however, for some features that might not be possible.[26]:5,9[28]

On-disk format changes can be associated with either features for write or features for read. The former are the features that an OpenZFS implementation must support to be capable of writing to the pool, while supporting such features is not mandatory for opening the pool in read-only mode. The latter are the features that an OpenZFS implementation must support to be able to read from the pool or to just open it, because opening a pool is not possible without actually reading from it.[26]:7

For example, async_destroy feature adds a new on-disk data structure to keep track of freed datasets, but an OpenZFS implementation does not need to know about this data structure to access the pool in read-only mode. Additionally, writing to a pool that has some features in active state is not possible by an OpenZFS implementation that does not support the same features.[26]:7–8

A list of feature flags and which OSes support them is available here - OpenZFS - Feature flags implementation

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. 5.0 5.1 Lua error in package.lua at line 80: module 'strict' not found.
  6. 6.0 6.1 Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. 9.0 9.1 9.2 Lua error in package.lua at line 80: module 'strict' not found.
  10. 10.0 10.1 Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.
  16. Lua error in package.lua at line 80: module 'strict' not found.
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. 18.0 18.1 Lua error in package.lua at line 80: module 'strict' not found.
  19. Lua error in package.lua at line 80: module 'strict' not found.
  20. Lua error in package.lua at line 80: module 'strict' not found.
  21. Lua error in package.lua at line 80: module 'strict' not found.
  22. Lua error in package.lua at line 80: module 'strict' not found.
  23. Lua error in package.lua at line 80: module 'strict' not found.
  24. Lua error in package.lua at line 80: module 'strict' not found.
  25. Lua error in package.lua at line 80: module 'strict' not found.
  26. 26.0 26.1 26.2 26.3 26.4 26.5 26.6 26.7 Lua error in package.lua at line 80: module 'strict' not found.
  27. Lua error in package.lua at line 80: module 'strict' not found.
  28. 28.0 28.1 Lua error in package.lua at line 80: module 'strict' not found.

External links