macOS上运行ZFS
pkg
包安装 OpenZFSonOsX
OpenZFS on OS X
直接提供了安装包,支持从 macOS 10.9 (Mavericks) - 15.0 (Sequoia) 不同版本(Intel/ARM)。我在 macOS 11.7 上安装使用非常方便,可以不用 Homebrew 也能够方便部署。
安装过程需要配置允许运行,如下文。由于过程简单,这里不再复述。
Homebrew 安装openzfs
Homebrew openzfs 提供了快速在macOS上安装ZFS的方法,其采用了 OpenZFS on OS X 开发的版本。从支持列表来看X86系列可以支持最新 macOS Sequoia 15系列,而Appple Silicon 则支持操作系统落后。
我在 MacBook Pro 2018 (Intel x86架构)笔记本上安装,操作系统是 sequoia
提示似乎没有正确安装对应版本,回落到上个发行版本 sonoma
? 不过看 Homebrew openzfs 列表 sequoia 和 sonoma 都使用了相同的 2.2.2,509
OpenZFS软件包:
==> Downloading https://formulae.brew.sh/api/cask-source/openzfs.rb
######################################################################### 100.0%
==> Downloading https://openzfsonosx.org/forum/download/file.php?id=509
######################################################################### 100.0%
==> Installing Cask openzfs
==> Running installer for openzfs with sudo; the password may be necessary.
Password:
Mounted ZFS file system(s) check
ZEVO files check
ZEVO launchctl check
ZEVO kextstat check
Executing: /usr/bin/kmutil showloaded
No variant specified, falling back to release
installer: Package name is Open ZFS on OsX 2.2.2 - Sonoma-14
installer: Installing at base path /
installer: The install was successful.
==> Changing ownership of paths required by openzfs with sudo; the password may
🍺 openzfs was successfully installed!
备注
系统默认会阻止加载模块,在安装过程中会弹出macOS System Settings
页面,请注意其中 Privacy & Security
页面中有提示:
System software from developer "Joergen Lundman" was blocked from loading.
这个开发者 Joergen Lundman 是OpenZFS开发者,需要允许加载,并重启操作系统生效
使用
尝试检查:
zfs list
检查zfs list
提示需要加载扩展模块
zfs list
提示需要加载 zfs.kext
The ZFS modules are not loaded.
Try running '/sbin/kextload zfs.kext' as root to load them.
则说明前面安装过程没有在 System Settings => Privacy & Security
页面允许加载开发者 "Joergen Lundman" 的系统软件(即内核模块)