I found some issues with xattr, OpenZFS on OS X v2.1.6, macOS Monterey 12.6.1, Intel:
1. It's not possible to set or change directory icons. The following image is taken from my local apfs volume. On the external ZFS pool only the blue standard directory icon is shown.
2. It's not possible to lock directories (image from local apfs volume):
3. rsync to my ZFS pool (encrypted dataset) complains about xattr:
My settings (zfs get ...) are:
aclmode=discard
aclinherit=restricted
xattr=sa
utf8only=on
normalization=formD
acltype=ntfsv4
encryption=aes-128-gcm
com.apple.mimic=apfs (no differnce if set to hfs)
There's a new tunable „kstat.zfs.darwin.tunable.zfs.xattr_compat“. By default this is set to „0“ (zero) which results in a lot of messages from rsync like this one:
rsync: [generator] get_xattr_data:
lgetxattr("/Volumes/R1_Backup-Z/R1_Safe-Z/Users/[…]/2010-12-24_18-38-09.NEF.cop","com.apple.system.Security",0)
failed: Operation not permitted (1)
None of these files are locked and they belong to the same user/group who invoked rsync. The same rsync to an apfs volume is running fine without errors.
If I set „kstat.zfs.darwin.tunable.zfs.xattr_compat=1“ the rsync message changes as follows:
rsync: [receiver] rsync_xal_set:
lremovexattr("/Volumes/R1_Backup-Z/R1_Safe-Z/Users/[…]/2022_04_28__10_43_39.NEF","macos:co.eclecticlight.dintch.hash#S")
failed: Attribute not found (93)
Even if rsync states an error, the xattr seems to be correct on the ZFS pool destination. Maybe it tries to remove that xattr („lremovexattr“) on the ZFS pool, but fails. The result is the expected behaviour: the xattr is synced too. But then this error message is a little confusing...
[By the way... the app „Dintch“ from eclecticlight calculates a hash value of a file and saves it as an extended attribute. With this hash value one can detect bit rot and other file changes on apfs or hfs file systems. Not so comfortable like ZFS... but better than nothing.]
The rsync error is not only restricted to those hash values:
rsync: [receiver] rsync_xal_set:
lremovexattr("/Volumes/R1_Backup-Z/R1_Safe-Z/Users/[…]/2018_08_22__10_17_35.NEF.cos","macos:com.apple.TextEncoding")
failed: Attribute not found (93)
Does anybody know what I am doing wrong? Or are those issues related to the new xattr handling of OpenZFS 2.1.6?