Jump to content

OpenZFS

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dsimic (talk | contribs) at 03:06, 15 April 2016 (Undid revision 715237174 by 77.56.53.183 (talk) Not an improvement). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Logo of the OpenZFS project

The 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 OS X 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 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

ZFS file system was originally developed by Sun Microsystems for the Solaris operating system. The source code was released 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]

As a result of the CDDL and GPL legal incompatibility, Sun's implementation of the ZFS file system could not be used as a basis for the development of a Linux kernel module, it could not be merged into the Linux kernel mainline, and Linux distributions did not include it as a precompiled kernel module.[10][11] Therefore, the ZFS code had to be rewritten from scratch for native ZFS support to be brought into the Linux kernel. 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; however, such an approach contains its own issues, one of which is performance penalty.[12]

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][13]

  • 2001: Closed-source development of ZFS started with two engineers at Sun Microsystems.
  • 2005: 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,[14][15] 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.[16][17]
  • 2013: The first stable release of a native Linux port.
  • 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]

Pool versions and feature flags

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.[18][19]

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.[13][20]

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 given by Oracle. Legacy version numbers still exist for pool versions 1–28, and are implied by the pool version 5000;[21] the initial proposal was to use 1000 as the pool version.[22] 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:[22]

  • 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.

Pool features can have one of three states:[22]

  • Disabled – this feature will not be used, and no on-disk format changes will be made (backward compatible).
  • Enabled – this feature will be used, no on-disk format changes have been made yet, but the software may make them at any time (still backward compatible).
  • Active – this feature has made backward incompatible on-disk format changes to the pool.

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.[21][22]

On-disk format changes can have one of two forms:[22]

  • Features for write – must be supported by an OpenZFS implementation in order to write to the pool, but the feature does not need to be supported for the pool to be opened in read-only mode.
  • Features for read – must be supported in order to read from the pool, and there is no way to open a pool without reading from it.

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.[22]

See also

References

  1. ^ Sean Michael Kerner (September 18, 2013). "LinuxCon: OpenZFS moves Open Source Storage Forward". infostor.com. Retrieved October 9, 2013.
  2. ^ a b "The OpenZFS project launches". LWN.net. September 17, 2013. Retrieved October 1, 2013.
  3. ^ Adam Leventhal (September 17, 2013). "OpenZFS: the next phase of ZFS development". dtrace.org. Retrieved October 1, 2013.
  4. ^ Matt Ahrens (October 2, 2012). "ZFS Day" (PDF). mahrens.org. Retrieved November 13, 2013.
  5. ^ a b "OpenZFS Announcement". open-zfs.org. September 17, 2013. Retrieved September 19, 2013.
  6. ^ a b "OpenZFS – Communities co-operating on ZFS code and features". freebsdnews.net. September 23, 2013. Retrieved March 14, 2014.
  7. ^ "OpenZFS". open-zfs.org. Retrieved September 19, 2013.
  8. ^ "Platform code differences". open-zfs.org. Retrieved September 20, 2013.
  9. ^ a b c "OpenZFS History". open-zfs.org. Retrieved September 24, 2013.
  10. ^ Eben Moglen; Mishi Choudharyl (February 26, 2016). "The Linux Kernel, CDDL and Related Issues". softwarefreedom.org. Retrieved March 30, 2016.
  11. ^ Bradley M. Kuhn; Karen M. Sandler (February 25, 2016). "GPL Violations Related to Combining ZFS and Linux". sfconservancy.org. Retrieved March 30, 2016.
  12. ^ Ryan Paul (June 9, 2010). "Uptake of native Linux ZFS port hampered by license conflict". Ars Technica. Retrieved July 1, 2014. {{cite web}}: Italic or bold markup not allowed in: |publisher= (help)
  13. ^ a b Matt Ahrens; Brian Behlendorf (September 17, 2013). "LinuxCon 2013: OpenZFS" (PDF). Linux Foundation. Retrieved November 13, 2013.
  14. ^ Bryan Cantrill (December 8, 2011). "Fork Yeah! The Rise and Development of illumos". SlideShare. Retrieved September 24, 2013.
  15. ^ "illumos FAQs". illumos.org. Retrieved September 24, 2013.
  16. ^ "MacZFS: Official Site for the Free ZFS for Mac OS". code.google.com. Retrieved March 2, 2014.
  17. ^ "OpenZFS on OS X". openzfsonosx.org. November 15, 2014. Retrieved November 23, 2014.
  18. ^ "Solaris ZFS Administration Guide, Appendix A ZFS Version Descriptions". Oracle Corporation. 2010. Retrieved February 11, 2011.
  19. ^ "Oracle Solaris ZFS Version Descriptions". Oracle Corporation. Retrieved September 23, 2013.
  20. ^ "OpenZFS Features – Feature flags". open-zfs.org. Retrieved September 23, 2013.
  21. ^ a b "OpenZFS FAQ: Are storage pools created by OpenZFS portable between operating systems?". open-zfs.org. September 26, 2013. Retrieved October 30, 2015.
  22. ^ a b c d e f Christopher Siden (January 2012). "ZFS Feature Flags (Illumos Meetup)" (PDF). delphix.com. p. 4. Retrieved September 22, 2013.