First things first ‐ installing znapzend - xenophon61/Znapzend-recipes-for-mixed-MacOS-Linux-environment GitHub Wiki
MacOS running Sonoma 14.6.1
- OpenZFSonOSX version 2.2.2
-
znapzend installed via Homebrew with a simple
brew install znapzend
- apply the fix for the homebrew.mxcl.znapzend.plist, as outlined here*
Useful commands:
- restarting the znapzend daemon (the "kill -HUP" doesn't work in MacOS)
sudo brew services restart znapzend
- the error log can be found at
tail /usr/local/var/log/znapzend.err.log
- checking the state of the daemon:
sudo launchctl list | grep znap
should return a status of "0"
41833 0 homebrew.mxcl.znapzend
Download the git to your home folder, and then issue a sudo su
# ZNAPVER=0.22.1
# ./configure --prefix=/opt/znapzend-${ZNAPVER}
# make
# make install
# ls -la /opt
# for x in /opt/znapzend-${ZNAPVER}/bin/*; do ln -fs ../../../$x /usr/local/bin/; done
# znapzend --version
znapzend version 0.22.0
Remember to check the section regarding init scripts. For OS X one must use the launchd procedure as follows:
~ % sudo launchctl unload /Library/LaunchDaemons/org.znapzend.plist
~ % sudo launchctl list | grep znap
~ % sudo launchctl load -w /Library/LaunchDaemons/org.znapzend.plist
~ % sudo launchctl list | grep znap
31477 0 org.znapzend
/bin/sh
/bin/zsh
/usr/bin/ssh
/usr/local/zfs/bin/zed
/usr/local/zfs/bin/zfs
/usr/local/bin/znapzend
Otherwise, running the LaunchDaemon will throw a 255
error.
> cat /Library/LaunchDaemons/org.znapzend.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/zfs/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<false/>
</dict>
<key>Label</key>
<string>org.znapzend</string>
<key>ProgramArguments</key>
<array>
<string>/opt/znapzend-0.22.1/bin/znapzend</string>
<string>--connectTimeout=512</string>
<string>--features=oracleMode,compressed</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/var/log/org.znapzend.stderr</string>
<key>StandardOutPath</key>
<string>/var/log/org.znapzend.stdout</string>
<key>ThrottleInterval</key>
<integer>30</integer>
</dict>
</plist>