creating a zpool in MacOS - xenophon61/Znapzend-recipes-for-mixed-MacOS-Linux-environment GitHub Wiki

The key issue revolves around the casesensitivity feature, which is NOT compatible with MacOS ― the pool is mounted as "HFS+ (case-sensitive)" and is essentially unusable.

Creating a pool in MacOS that is cross-platform-compatible (using spinning disks) should resemble this:

# zpool create -o ashift=12 -O casesensitivity=insensitive -O normalization=formD -O checksum=edonr -O compression=lz4 -O atime=off [pool name] /dev/diskX

It's best to use disk IDs instead of diskX, and this can be accomplished by first exporting, and then re-importing as follows:

# zpool import -a -d /var/run/disk/by-id

Then, enable some OSX-specific features as follows (as root):

zfs set com.apple.ignoreowner=on [pool name]
zfs set com.apple.mimic=hfs [pool name]
zfs set com.apple.devdisk=on [pool name]

If the target zpool resides on a workstation machine, i.e. must be readable on the desktop, then one should enable the zfs readonly flag. The reason for this is that otherwise znapzend will not be able to reliably update a live zpool, resulting in major instability. For read/write access to the datasets, one can create a clone (use the Applescript provided in the repo for guidance)

Now, let's set some properties required by znapzend, irrespective whether it's the sending or receiving machine:

zfs allow root compression,create,destroy,mount,mountpoint,receive,rollback,send,snapshot [pool name]
zfs allow [user name] compression,create,destroy,mount,mountpoint,receive,rollback,send,snapshot [pool name]

Should be all set. One can enable the sharenfs zpool property to automatically present nfs shares, but this will prevent the machine from sleeping (the nfsd daemon is responsible).

References: