# OpenZFS on OS X

面向 macOS 的 ZFS 驱动程序和实用工具，用于管理 ZFS 存储，并支持在 Finder 中访问文件系统挂载。

> 这是 OpenNavo 上 OpenZFS on OS X 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/openzfs>

- **最新版本**: `2.4.1p2`
- **开发者**: OpenZFS on macOS Project
- **主页**: <https://openzfsonosx.org/>
- **分类**: [驱动与硬件](https://opennavo.com/zh/categories/drivers)
- **安装**: `brew install --cask openzfs`
- **近 30 天安装**: 193
- **Homebrew**: 可以安装，由 Homebrew 更新
- **下载地址**: <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-GoldenGate-27-arm64.pkg>
- **SHA-256**: `4123057fe0a4ff6fe56d4d500255cae1fc94057c9b08389069cbf411b7b27c43`
- **安装包**: OpenZFSonOsX-2.4.1p2-GoldenGate-27-arm64.pkg

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 注意事项

openzfs requires a kernel extension to work. If the installation fails, retry after you enable it in: System Settings → Privacy & Security For more information, refer to vendor documentation or this Apple Technical Note: https://developer.apple.com/library/content/technotes/tn2459/_index.html

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "uninstall_preflight_steps": [
        {
          "steps": [
            {
              "args": [
                "export",
                "-af"
              ],
              "command": {
                "path": "/usr/local/zfs/bin/zpool"
              },
              "guards": [
                {
                  "condition": "if_exists",
                  "id": "1",
                  "path": "/dev/zfs"
                }
              ],
              "sudo": true,
              "type": "run"
            }
          ]
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall_preflight_steps"
  },
  {
    "declaration": {
      "uninstall": [
        {
          "launchctl": [
            "org.openzfsonosx.InvariantDisks",
            "org.openzfsonosx.zconfigd",
            "org.openzfsonosx.zed",
            "org.openzfsonosx.zpool-import",
            "org.openzfsonosx.zpool-import-all"
          ],
          "pkgutil": "org.openzfsonosx.zfs"
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall"
  },
  {
    "declaration": {
      "pkg": [
        "OpenZFSonOsX-2.4.1p2-GoldenGate-27-arm64.pkg"
      ]
    },
    "phase": "install",
    "sources": [
      "OpenZFSonOsX-2.4.1p2-GoldenGate-27-arm64.pkg"
    ],
    "type": "pkg"
  },
  {
    "declaration": {
      "bash_completion": [
        "/etc/bash_completion.d/zfs"
      ],
      "target": "$HOMEBREW_PREFIX/etc/bash_completion.d/zfs"
    },
    "phase": "install",
    "sources": [
      "/etc/bash_completion.d/zfs"
    ],
    "target": "$HOMEBREW_PREFIX/etc/bash_completion.d/zfs",
    "type": "bash_completion"
  },
  {
    "declaration": {
      "bash_completion": [
        "/etc/bash_completion.d/zpool"
      ],
      "target": "$HOMEBREW_PREFIX/etc/bash_completion.d/zpool"
    },
    "phase": "install",
    "sources": [
      "/etc/bash_completion.d/zpool"
    ],
    "target": "$HOMEBREW_PREFIX/etc/bash_completion.d/zpool",
    "type": "bash_completion"
  },
  {
    "declaration": {
      "postflight_steps": [
        {
          "steps": [
            {
              "paths": [
                {
                  "path": "/usr/local/zfs"
                }
              ],
              "type": "set_ownership"
            }
          ]
        }
      ]
    },
    "phase": "install",
    "sources": [],
    "type": "postflight_steps"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": [
            "~/Library/LaunchDaemons/org.openzfsonosx.InvariantDisks.plist",
            "~/Library/LaunchDaemons/org.openzfsonosx.zconfigd.plist",
            "~/Library/LaunchDaemons/org.openzfsonosx.zed.plist",
            "~/Library/LaunchDaemons/org.openzfsonosx.zpool-import-all.plist",
            "~/Library/LaunchDaemons/org.openzfsonosx.zpool-import.plist"
          ]
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

OpenZFS on OS X 为 macOS 安装 ZFS 驱动程序和实用工具。该项目将其文件系统描述为提供池化存储和原生 macOS 集成；它是存储系统组件，并非图形化管理应用。

- ZFS 使用校验和检测数据损坏；项目说明可借助冗余奇偶校验进行纠正。
- 支持按时间点创建写时复制快照。
- 项目列出的功能包括原生加密和 ZSTD。
- 文件系统挂载可通过 macOS Finder 访问，软件包还包含 `zfs` 和 `zpool` 的 shell 补全文件。

使用 `brew install --cask openzfs` 安装。Homebrew 会根据 macOS 版本和处理器架构选择软件包。安装需要内核扩展。如果安装失败，提供的说明建议在“系统设置”→“隐私与安全性”中允许该扩展，然后重试。更多信息请参阅厂商文档。

[OpenZFS on macOS](https://openzfsonosx.org/) · [Homebrew cask](https://raw.githubusercontent.com/Homebrew/homebrew-cask/HEAD/Casks/o/openzfs.rb)

## 系统要求

- 适用于 macOS 27 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-GoldenGate-27-arm64.pkg>
  - SHA-256: `4123057fe0a4ff6fe56d4d500255cae1fc94057c9b08389069cbf411b7b27c43`
- 适用于 macOS 26 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Tahoe.26-26.pkg>
  - SHA-256: `399ce127ce1fc0eb462346af4553c337a76adc82516033e34e74a21cc6a5c828`
- 适用于 macOS 26 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Tahoe.26-26-arm64.pkg>
  - SHA-256: `582ffd6bb083ed9de123994b5609da39ed9347e624d81474ba3f2dc53a0e5f21`
- 适用于 macOS 15 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Sequoia-15.pkg>
  - SHA-256: `62dca33ac2e2a724865c072c5fb2f152a532da28886efd055414be498d7fe077`
- 适用于 macOS 15 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Sequoia-15-arm64.pkg>
  - SHA-256: `9f8ca1b894974244dc2f0f362fcae0ed05b0082bbaf72ef7215939cdad272769`
- 适用于 macOS 14 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Sonoma-14.pkg>
  - SHA-256: `cc2716f0ef15a53211fff079922b15e94616b9ee1f689a859085a32541d441ad`
- 适用于 macOS 14 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Sonoma-14-arm64.pkg>
  - SHA-256: `c6f07507e0594c1d7f77adb3878d45558b3ddd09064676b118d271581fef6705`
- 适用于 macOS 13 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Ventura-13.pkg>
  - SHA-256: `ee3c779da3be97f8ba9c6f868c7bec877fc26c25f07a17e79aae782131bf22f3`
- 适用于 macOS 13 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Ventura-13-arm64.pkg>
  - SHA-256: `cfbfb7f39e047c3c5232799fedf26bac6f674ef1dc7a34364231b36f7dd46561`
- 适用于 macOS 12 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Monterey-12.pkg>
  - SHA-256: `9757746f9401687e382f7cdfda80c8f827f478379be76ac587664f8cb6430910`
- 适用于 macOS 12 的版本 · 应用版本: 2.4.1p2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Monterey-12-arm64.pkg>
  - SHA-256: `05a357c155770df6f93cb2623cdd5737d2a41ad6cf3f2dc723d94d097037b5f0`
- 适用于 macOS 11 的版本 · 应用版本: 2.4.1p2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
  - <https://github.com/openzfsonosx/openzfs-fork/releases/download/zfs-macOS-2.4.1p2/OpenZFSonOsX-2.4.1p2-Big.Sur-11.pkg>
  - SHA-256: `c11a74b394e902265608dd73d2d05011b16acac33c8d1d869a19c840509dbe72`

## 卸载

- `brew uninstall --cask openzfs`

普通卸载会删除应用本身，设置和缓存会保留。

### 卸载时还会处理

- 后台服务（launchctl）: `org.openzfsonosx.InvariantDisks` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 后台服务（launchctl）: `org.openzfsonosx.zconfigd` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 后台服务（launchctl）: `org.openzfsonosx.zed` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 后台服务（launchctl）: `org.openzfsonosx.zpool-import` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 后台服务（launchctl）: `org.openzfsonosx.zpool-import-all` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 安装包收据（pkgutil）: `org.openzfsonosx.zfs` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

### 深度清理（可选）

- `brew uninstall --zap --cask openzfs`

`--zap` 还会删除 Homebrew 定义里列出的设置、缓存等文件，其中可能有其他应用共用的数据，删除后无法恢复；它也不保证没有任何残留。请先备份需要保留的数据；如要保留设置和缓存，请不要加 `--zap`。

普通卸载会删除应用本身，设置和缓存会保留。

- 文件和文件夹: `~/Library/LaunchDaemons/org.openzfsonosx.InvariantDisks.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/LaunchDaemons/org.openzfsonosx.zconfigd.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/LaunchDaemons/org.openzfsonosx.zed.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/LaunchDaemons/org.openzfsonosx.zpool-import-all.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/LaunchDaemons/org.openzfsonosx.zpool-import.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-01；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

## 最新版本说明

### 2.4.4rc3 (2026-10-14)

*** zfs-macOS-2.4.4rc3

#### OpenZFS on OS X 2.4.4rc3

Changes since rc2: crash and hang fixes, a round of memory and performance work from rottegift, and hardware-accelerated encryption on Apple Silicon.

##### Crash and hang fixes
- **Unmount/export hang fixed.** A file opened during a write-sync could keep a stray reference on its vnode, so the unmount waited forever. Spotlight indexing a new dataset triggered this easily. (`macOS: release async-zget znodes that are not attached yet`)
- **Unmounting now always goes through DiskArbitration.** It tries a normal `diskutil unmount` first and falls back to a forced unmount only when asked. It never uses `umount -f`, which bypassed DiskArbitration and could leave Spotlight (`mds`) holding files.
- **Stale per-file state on reused znodes fixed.** `z_suspended` and `z_document_id` are now reset each time a znode is allocated, including for `.zfs` snapshot-directory entries.
- **Timer interval fixes.** Several wrong time-interval calculations are corrected. One of them made the ARC run as an MRU-only cache instead of a balanced MRU/MFU cache, which hurt cache hit rates.

##### Memory and performance (rottegift)
- **ABD buffers use `IOMallocData()` on macOS 15 and newer.** These are the kext's largest memory consumer. They now come from the data allocator instead of `IOMallocAligned()`, which eases pressure on the kernel's shared memory map.
- **Kernel memory caches are grouped by how long their allocations live.** Short-lived and long-lived allocations no longer fragment each other. There is also a diagnostic report of what each cache holds.
- **Memory is returned after a large free.** Per-CPU caches that keep memory pinned are now flushed after a mass free, so memory goes back to the system sooner.
- **The slab consolidator's rate can be changed while running.**
- **The number of ZFS vnodes can optionally be capped.** This is off by default. When on, idle vnodes are recycled in batches to limit the memory they pin.
- **Apple Silicon CPU layout.** CPU IDs are numbered without gaps, and efficiency (E) cores are counted.
- **SPL load messages are kept in a boot-log kstat**, along with a summary of memory sizing at load.

##### Encryption
- **Accelerated AES on Apple Silicon (#117).** The AES modes and GCM now use the ARMv8 crypto instructions (`aesv8`/`ghashv8`), and the fastest available implementation is selected automatically. They pass all ICP test vectors: 322 of 322 for GCM and 552 of 552 for CCM.

*** zfs-macOS-2.4.4rc3p1

* Changes to the installer to handle exporting pools better

---

*** zfs-macOS-2.4.4rc2-anyraid

- rc2 build with new anyraid support if anyone wants to test it. It is not in rc3

----

*** zfs-macOS-2.4.4rc2

- raidz1 arithmetic could corrupt pointers on arm64.

----

*** zfs-macOS-2.4.4rc1

Changes since 2.4.3rc5

New features (macOS)
- ZFS Versions (ported from Windows into ZetaWatch): a file's earlier versions in snapshots, with Open, Copy To and Restore. Open it from Finder → Services → "ZFS Versions…" or with zetawatch://versions?path=.
- ZFS Deleted Items: lists files deleted from a folder that still exist in its snapshots, and can restore them. Open it from Finder → Services → "ZFS Deleted Items…".
- New libzfs function zfs_get_obj_version().
- fcntl(F_PUNCHHOLE), _PC_MIN_HOLE_SIZE and renamex_np(RENAME_SWAP) are now implemented.
- symbolicate_panic_macos.py has a --live mode and reads the compact-stackshot paniclog format.

Fixes (macOS)
- Data corruption: writev() across a record boundary (Akhil).
- Kernel panic when com.apple.owneruid/ownergid is out of range on mounts with ownership ignored (#138).
- Stale negative name-cache entries (#113).
- Unmount hang: vnops no longer hold the teardown lock across ERESTART retries.
- Rollback now unmounts and remounts descendant filesystems.
- snapdir=disabled is now enforced.
- Use-after-free in mkdir/symlink.
- ldi_strategy/ldi_close race and NULL vd_lh in vdev_disk.
- zvol: wrong status and byte counts on async I/O, and stale open flags.
- ARM64 AES decrypt was calling the encrypt routine.
- zfs_uio_page_aligned() read past the end of the iovecs.
- /etc/exports was created with mode 0600.
- _tunable_zfetch sysctl was not registered.
- ZetaWatch: the helper no longer asks for a password at every login.

Build and packaging
- Builds with Xcode 27 and the macOS 27 SDK (blake3 asm, pipe2).
- The kext is built arm64e-only.
- zpool no longer has the app-sandbox entitlement.
- Clean builds on Linux and FreeBSD, plus SPDX tags (fro0 work).
- Test-suite fixes for macOS.

Upstream OpenZFS (about 350 commits), mainly:
- Block-cloning fixes: self-deadlock and double free.
- ARC: a race between arc_release() and arc_read_done(), and a use-after-free in dnode_rele.
- DDT pruning fixes.
- A raidz expansion startup race.
- Imports now work with corrupted spare or l2arc configs
- New commands and options: zpool status -vv error ranges, zpool initialize -z, zstream raw, zhack MOS leak tools.
- Performance: lockless spa_config_lock reads and less dp_lock/dd_lock use.

## 资料与来源

- <https://opennavo.com/zh/apps/openzfs>
- <https://opennavo.com/zh/apps/openzfs/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/o/openzfs.rb> · 核查于 2026-12-01
- <https://formulae.brew.sh/cask/openzfs>
