Why zfs xattr=on instead sa?

Hello folks!

I wonder why you use default xattr=on for NFS datasets and why we don’t have option on the dashboard ?

zfsprops.7 — OpenZFS documentation

To have fast and low latency NFS shares on ZFS we need minimum ACL and ATTR layers or conversion.

What is the best practice to achive this goal and why Truenas only uses defaults ?

Best regards.

When did you create your datasets?

The default for newly created datasets (at least in TrueNAS Core 13+) is xattr=sa

We default to SA for SMB datasets. We could probably do it across the board. Prior to TrueNAS 13 it was not available on FreeBSD, and issue was moot anyway because of lack of support for xattrs over the NFS protocol.

Typically we just allow ZFS to inherit whatever properties were set on parent dataset. That said, heavy xattr users over NFS might be like hen’s teeth.

I made pull request to set by default on newly-created pools. Would be no earlier than fangtooth (25.04).

1 Like

I tried on TrueNAS-SCALE-22.12.0 and 23.10.2 both of them default xattr=on.

Make sense. Extended attributes mostly related with smb shares but I use extended attributes like g+s and default acl’s on NFS shares. I wonder what is the performance difference on this type of usage.

Is it really important in my case?

1 Like

If you use the NFSv4 acltype then the ACL isn’t stored in an xattr.

Good point. I use V4 with V3 ACL support so in this case I use xattr right?