A native macOS menu bar application for seamless OpenZFS pool and dataset management with automated scrubbing and TRIM scheduling.
- Automatic Pool Import - Import all ZFS pools at boot time, before user login
- Encryption Support - Manage encryption keys via macOS Keychain or keyfiles
- Menu Bar Interface - Native SwiftUI menu bar app showing pool status and capacity
- Real-Time Monitoring - Automatic updates when pools or datasets change
- Dataset Management - Mount/unmount datasets with one click
- Automated Scrubbing - Schedule regular pool integrity checks (weekly/monthly/quarterly)
- Automated TRIM - Schedule TRIM operations for SSD-based pools (daily/weekly/monthly)
- SSD Detection - Automatically detect SSDs and determine TRIM eligibility
- Manual Operations - "Run Now" buttons for immediate scrub/TRIM execution
- Status Display - View scrub and TRIM status directly in the menu bar
- Privileged Helper - Secure root-level operations via XPC
- Keychain Integration - Store encryption keys securely in macOS Keychain
- Keyfile Support - Reference keyfiles stored in
/etc/zfs/keys/ - Boot-Time Access - Support for both system and user keychains
📦 mypool
✅ Health: ONLINE
💾 Used: 500G / 2T
🔍 Last Scrub: Oct 16, 2025 - Clean
✂️ TRIM: Eligible
Datasets:
✅ mypool/data 🔒
→ Mounted
- Scrub scheduling with frequency selection
- TRIM scheduling for SSD pools
- Per-pool status display
- Manual "Run Now" buttons
- View all encrypted datasets
- Manage keychain and keyfile keys
- Edit or switch between key types
- Visual badges for key sources
- macOS 26.0 (Tahoe) or later
- OpenZFS installed
- Xcode 16.0+ (for building from source)
# Clone the repository
git clone https://github.com/yourusername/ZFSAutoMount.git
cd ZFSAutoMount
# Build and deploy
./deploy-simple.shThe script will:
- Build the app and privileged helper
- Deploy to
/Applications/ - Install the privileged helper
- Launch the app
# Build in Xcode
xcodebuild -scheme ZFSAutoMount -configuration Debug build
# Copy to Applications
cp -R ~/Library/Developer/Xcode/DerivedData/ZFSAutoMount-*/Build/Products/Debug/ZFSAutoMount.app /Applications/
# Launch
open /Applications/ZFSAutoMount.appOn first launch, the app will:
- Install the privileged helper (requires admin password)
- Scan for ZFS pools
- Display pool status in menu bar
- Open Preferences → General
- Check "Auto-import pools on boot"
- Check "Auto-mount datasets on boot"
- Enter admin password when prompted
The boot daemon will be installed and pools will auto-mount at startup.
If you have encrypted datasets:
- Open Preferences → Encryption
- Click Edit on a dataset
- Choose key source:
- Keychain: Enter passphrase or hex key
- Keyfile: Enter path to keyfile (e.g.,
/etc/zfs/keys/mypool.key)
- Click Save
- Open Preferences → Maintenance
- Enable automatic scrubbing (recommended: Monthly)
- Enable automatic TRIM for SSD pools (recommended: Weekly)
- Click Run Now to test
Located at: /Library/LaunchDaemons/org.openzfs.automount.daemon.plist
Controlled via Preferences → General toggles.
Keychain Storage:
- Service:
org.openzfs.automount - Account:
poolname/dataset
Keyfile Storage:
- Config:
/etc/zfs/automount.conf - Keys:
/etc/zfs/keys/
Example config:
# Format: dataset option=value
mypool/encrypted keylocation=file:///etc/zfs/keys/mypool.key
Located at:
/Library/LaunchDaemons/org.openzfs.automount.scrub.plist/Library/LaunchDaemons/org.openzfs.automount.trim.plist
Managed via Preferences → Maintenance tab.
- Mount All Datasets - Mount all unmounted datasets
- Preferences - Open preferences window
- Click on pool name to see detailed status
⌘,- Open Preferences⌘M- Mount All Datasets⌘Q- Quit ZFSAutoMount
# Check helper status
./Scripts/check-helper-status.sh
# View comprehensive status
./Scripts/check-all-status.sh
# View logs
sudo tail -f /var/log/org.openzfs.automount.helper.log
tail -f /var/log/zfs-scrub.log
tail -f /var/log/zfs-trim.log-
Main App (user-level)
- Menu bar interface
- Configuration management
- Keychain access
- User interactions
-
Privileged Helper (root-level)
- Executes
zpoolandzfscommands - Communicates via XPC
- Installed manually (no code signing required for development)
- Executes
-
LaunchDaemons
- Boot automation daemon
- Scrub scheduler
- TRIM scheduler
- ZFSManager - Core ZFS operations coordinator
- DiskTypeDetector - SSD detection and TRIM eligibility
- KeychainHelper - Secure key storage
- ConfigParser - Configuration file management
- MenuBarController - User interface
- PrivilegedHelper - Root-level command execution
# Build both app and helper
xcodebuild -scheme ZFSAutoMount -configuration Debug build
xcodebuild -scheme PrivilegedHelper -configuration Debug build
# Or use the deployment script
./deploy-simple.shZFSAutoMount/
├── ZFSAutoMount/ # Main application
│ ├── ZFSAutoMountApp.swift
│ ├── MenuBarController.swift
│ ├── ZFSManager.swift
│ ├── DiskTypeDetector.swift
│ ├── KeychainHelper.swift
│ └── PreferencesView.swift
├── PrivilegedHelper/ # Root-level helper
│ ├── HelperMain.swift
│ └── HelperProtocol.swift
├── Documentation/ # Comprehensive docs
├── Examples/ # Configuration examples
└── Scripts/ # Utility scripts
See CONTRIBUTING.md for development guidelines.
# Make code changes
# Then deploy everything:
./deploy-simple.sh
# This rebuilds app, helper, and installs everythingIf you get errors about the privileged helper:
# Check helper status
./Scripts/check-helper-status.sh
# Reinstall manually
./Scripts/manual-install-helper.sh# Check comprehensive status
./Scripts/check-all-status.sh
# View helper logs
sudo tail -f /var/log/org.openzfs.automount.helper.log# Check if daemon is loaded
sudo launchctl list | grep automount.daemon
# View boot logs
sudo log show --predicate 'process == "ZFSAutoMount"' --last 1hSee Documentation/TROUBLESHOOTING_SCRUB_TRIM.md for detailed troubleshooting.
- Quick Start - Get started quickly
- Build Guide - Detailed build instructions
- Usage Guide - Complete usage documentation
- Project Summary - Technical overview
- Deployment Workflow - Development workflow
- CLAUDE.md - AI assistant context
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with OpenZFS on macOS
- Developed with assistance from Claude Code
- Inspired by the need for native macOS ZFS integration
- Issues: Report bugs via GitHub Issues
- Documentation: See the Documentation directory
- Community: OpenZFS macOS discussions
- ✅ Pool auto-import at boot
- ✅ Encryption key management
- ✅ Menu bar interface
- ✅ Automated scrub/TRIM scheduling
- ✅ Real-time monitoring
- Health monitoring with notifications
- Historical scrub/TRIM statistics
- Pool health dashboard
- iOS companion app
- iCloud configuration sync
Q: Does this work without code signing? A: Yes! The deployment script installs the privileged helper manually, bypassing SMJobBless.
Q: Which versions of macOS are supported? A: macOS 26.0 (Tahoe) and later. Earlier versions may work but are untested.
Q: Can I use this in production? A: Yes, but test thoroughly first. The app has been designed for reliability and daily use.
Q: Does it support pool creation?
A: No, pool creation is intentionally excluded. Use zpool create commands for that.
Q: How does TRIM detection work?
A: The app uses diskutil to detect SSDs and their protocols (NVMe, SATA, USB, Thunderbolt), then determines TRIM eligibility automatically.
Made with ❤️ for the macOS + ZFS community