ZFS Best Practices for Changing xattr=off on ZFS (FreeBSD) with Syncoid Replication

I'm planning to change the xattr property on my FreeBSD ZFS file server from on to off and want to validate my approach before applying it to production. I also replicate snapshots to a backup server using syncoid.

Setup & Testing:'

Current replication command:
/usr/local/bin/syncoid --recursive --compress=none --preserve-recordsize --no-rollback --no-sync-snap --recvoptions="o readonly=on" **remote_server_here** **local_server_here**
On a test file server, I changed xattr=off on the dataset, and all snapshots inherited the setting.

Created new files—confirmed no extended attributes were being stored.

Ran syncoid replication to the test backup server—new snapshots were transferred successfully.

On the test backup server, snapshots and datasets retained their original xattr=on setting.

After setting xattr=off on the backup server, replication still worked without issues.

Questions Before Production:
Any potential downsides to setting xattr=off?

Anything I might be overlooking that could impact ZFS behavior, performance, or replication?

Any edge cases where applications or metadata might be affected?

Since I don’t use extended attributes and want to prevent them from being added, this change seems logical, but I want to confirm with the community before proceeding.

Verified that I didn't have any attributes via
find /tank -exec getextattr user DOSATTRIB {} \; -print 2>/dev/null

Appreciate any insights!
 
[…] Anything I might be overlooking that could impact ZFS behavior, performance, or replication? […]
The xattr zfsprops(7) just enables/disables exposure of the interface. The data is still there and still gets copied.​
Bash:
# Set up test environment.
cd /tmp

truncate -s 1T fileserver backup
zpool create fileserver `pwd`/fileserver
zpool create backup     `pwd`/backup

# Create some dummy file.
touch /fileserver/importantFile
setextattr user extendedAttribute extendedAttributeValue ${_}

# Disable interface.
zfs set xattr=off fileserver
# getextattr(1) fails now

# Clone.
zfs set xattr=off backup
zfs snapshot fileserver@now
zfs send fileserver@now | zfs receive backup/fileserver

# Enable interface again.
zfs set xattr=on backup/fileserver

# Extended attributes have been copied:
getextattr user extendedAttribute /backup/fileserver/importantFile
Setting xattr=off really just ensures that no additions, modifications or removal of extended attributes can occur. Ergo: Only newly created files are guaranteed to not be associated with any extended attributes.​
 
To make sure I understand, existing files that have the extended attributes will still have the attributes, any new files added would not get copied to the dataset with xattr=off with their extended attributes. That is what I seem to find when testing.
 
Back
Top