大网数据广告活动
服务器运维问答

How to use NFS v4.2 user_xattr on Debian Linux

· 52CE 我爱测

My mount command does not accept the user_xattr flag. Is my nfs-common not yet ready for it? Mounting fails: root@client:/# mount.nfs4 -vvvv nas:/tank /tank -o vers=4.2,user_xattr mount.nfs4: timeout set for Wed Dec 2 17:41:51 20…

问题原文

原帖链接 · Jotschi · CC BY-SA 4.0

My mount command does not accept the user_xattr flag. Is my nfs-common not yet ready for it?

Mounting fails:

root@client:/# mount.nfs4 -vvvv nas:/tank /tank -o vers=4.2,user_xattr
mount.nfs4: timeout set for Wed Dec  2 17:41:51 2020
mount.nfs4: trying text-based options 'vers=4.2,user_xattr,addr=192.168.11.1,clientaddr=192.168.11.2'
mount.nfs4: mount(2): Invalid argument
mount.nfs4: an incorrect mount option was specified

Running (on client and NAS)

  • Linux client 5.9.0-3-amd64 #1 SMP Debian 5.9.9-1 (2020-11-19) x86_64 GNU/Linux
  • OS: Debian Linux bullseye/sid

Packages:

ii  nfs-common                                 1:1.3.4-4                         amd64        NFS support files common to client and server
ii  nfs-kernel-server                          1:1.3.4-4                         amd64        support for NFS kernel server

Sources:

已采纳解答

原帖链接 · kofemann · CC BY-SA 4.0

You don't need any extra mount options to get xattrs to work (this is example on Fedora, but should be no difference)

# uname -a
Linux nairi 5.9.10-200.fc33.x86_64 #1 SMP Mon Nov 23 18:12:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
# mount -vvvv lab007:/ /mnt/
mount.nfs: timeout set for Thu Dec  3 09:03:35 2020
mount.nfs: trying text-based options 'vers=4.2,addr=a.b.c.d,clientaddr=a.b.c.d
# cd /mnt/exports/data
# attr -l .
Attribute "dcache.tag.foo-tag" has a 4 byte value for .
Attribute "dcache.tag.OSMTemplate" has a 15 byte value for .
Attribute "dcache.tag.sGroup" has a 5 byte value for .
# attr -g dcache.tag.sGroup .
"dcache.tag.sGroup" had a 5 byte value for .:
sla2

Make sure that exported file system supports xattr.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-12-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。