ZFS - heldersrvio/PureDarwin GitHub Wiki

ZFS

ZFS stands for "Zettabyte File System". It was designed and implemented by a team at Sun Microsystems led by Jeff Bonwick. Since the release of Darwin 9, ZFS became a core platform technology; and work is well underway to realise its full potential within PureDarwin.

Contents 1. [**1** MacZFS.org](zfs.html#TOC-MacZFS.org) 2. [**2** Parts of ZFS](zfs.html#TOC-Parts-of-ZFS) 1. [**2.1** Filesystem kext](zfs.html#TOC-Filesystem-kext) 2. [**2.2** Performance, Integrity and Stability](zfs.html#TOC-Performance-Integrity-and-Stability) 3. [**2.3** Building ZFS](zfs.html#TOC-Building-ZFS) 4. [**2.4** Resources](zfs.html#TOC-Resources)

MacZFS.org {style="font-family:Arial,Verdana,sans-serif;line-height:normal"}

Enthusiasts of ZFS and of PureDarwin will want to read the whole web site from the beginning, for an idea of what's to come from the alliance of these two communities and their technologies. PureDarwin users will require manual installation for now, in order to upgrade to the latest stable release of MacZFS. From there, all other MacZFS.org documentation is generally relevant. All development of ZFS on Mac OS takes place at MacZFS.org. They host packages for Mac OS, and that can be manually installed upon PureDarwin.

The ZFS implementation that runs on Mac OS X (and Darwin) can be downloaded or compiled.

Fyi, ZFS is pure. Parts of ZFS

On Mac OS X (and Darwin), ZFS consists of the following parts: A filesystem kext, System/Library/Extensions/zfs.kext Whenever zfs is used, this kext gets loaded. Being a filesystem kext, it is not loaded at boot time (unlike other kexts), but dynamically when needed (this requires a working kextload on the system). There may also be a zfs.readonly.kext, which is a temporary placeholder on Mac OS X and is not needed for the purposes of PureDarwin. A filesystem, /System/Library/Filesystems/zfs.fs Contained therein is, among other things, a command-line tool called zfs.util A library, libzfs.dylib Command-line tools in /usr/sbin, 

  1. zpool (configures ZFS storage pools)
  2. zfs (configures ZFS file systems)
  3. zoink (misc)
  4. zfs.util (ZFS file system utility) A settings file, /etc/zfs/zpool.cache (a cache that describes active ZFS pools on the system) The device /dev/zfs, this is created automatically when zfs.kext gets loaded (which happens whenever you call the zfs command-line tool, for example).

Filesystem kext

As mentioned above, zfs.kext is not a regular kernel extension but instead is a filesystem kext. Among other things, this means that it is not loaded at boot time, but is loaded automatically on demand through kextload. Unfortunately, documentation on filesystem kexts is hard to find.

Performance, Integrity and Stability

Sun (and the FreeBSD project) recommend that at least 512MB of RAM is available, to ensure that ZFS performs reliably, although it will work on systems with less than 512MB with suboptimal performance. ZFS was designed to perform best on 64-bit systems, although it works on 32-bit systems.

Building ZFS

This section will be updated, pending the official integration of MacZFS into PureDarwin.  The old instructions are provided for reference in the hope that you will help to update it.

Our favorite way is through darwinbuild via a custom plist containing the paste below. You will notice that only two architectures have been specified, because it does not yet build on 64bits arch (ppc64 or x86_64). `darwinbuild zfs' is pretty straight forward.

zfs = { configuration = "Leopard_Release"; dependencies = { lib = ( Libsystem, dyld, libgcc, ncurses, ); }; environment = { "RC_ARCHS" = "i386 ppc"; }; "source_sites" = ( "http://puredarwin.googlecode.com/hg/Mirror/", "http://puredarwin.googlecode.com/svn/Mirror/", ); version = "119"; };

Resources

http://en.wikipedia.org/wiki/ZFS http://opensolaris.org/os/community/zfs/

http://groups.google.com/group/zfs-macos http://maczfs.org/ Sun Solaris ZFS Administration Guide Getting Started Guide for MacZFS MacZFS FAQ MacZFS mailing list

⚠️ **GitHub.com Fallback** ⚠️