nfs sharing in scale

Eric Masson

Cadet
Joined
Jan 12, 2023
Messages
2
Hello,

Has anyone used idmap in a nfsv4 context on SCALE (22.12.4.2 here)
I can't find anything related to idmap in Services/NFS/configuration.
The documentation hasn't so far provided any insight in this area.
 

Eric Masson

Cadet
Joined
Jan 12, 2023
Messages
2
Hello,

I've progressed further
NFS is configured this way :

[truenas]> service nfs config
+-------------------+--------------+
| id | 1 |
| servers | 16 |
| udp | false |
| allow_nonroot | false |
| protocols | NFSV4 |
| v4_v3owner | false |
| v4_krb | false |
| bindip | <empty list> |
| mountd_port | <null> |
| rpcstatd_port | <null> |
| rpclockd_port | <null> |
| mountd_log | false |
| statd_lockd_log | false |
| v4_domain | |
| v4_krb_enabled | false |
| userd_manage_gids | false |
| v4_owner_major | |
+-------------------+--------------+

idmap service is up

root@truenas[~]# ps ax | grep -e nfs -e rpc
2163 ? I< 0:00 [rpciod]
158449 ? Ss 0:00 /usr/sbin/nfsdcld
158754 ? Ss 0:00 /usr/sbin/rpc.idmapd
158756 ? Ss 0:00 /sbin/rpcbind -f -w
158757 ? Ss 0:00 /sbin/rpc.statd
158758 ? Ss 0:00 /usr/sbin/rpc.mountd
...
158780 ? S 0:00 [nfsd]
...

id mapping is activated

echo "N" > /sys/module/nfsd/parameters/nfs4_disable_idmapping

Mounting a share from a remote FreeBSD host seems to work :

sudo mount_nfs -o nfsv4,nolockd,sec=sys truenas:/mnt/SpinningRust/home/user /home/user/nas
user@freebsd:~ % ll nas/
total 165947
drwxrwx---+ 2 user nogroup 3 Nov 8 15:48 .ssh/
-rwxrwx---+ 1 user user 49165 Oct 31 15:40 .zcompdump*
-rwxrwx---+ 1 user user 612 Nov 1 02:32 .zsh_history*
-rwxrwx---+ 1 user user 1295 Jan 6 2023 .zshrc*
-rwxrwx---+ 1 user user 26624 Oct 23 19:06 dmc.cpio*
-rwxrwx---+ 1 user user 513 Oct 22 17:18 splitmbox.awk*
...

Moving a file from the FreeBSD host to the NFS share succeeds (mapall User & group set to user on Truenas) but some messages tend to indicate the id mapping doesn't work in FreeBSD to Truenas direction :
user@freebsd:~/nas % mv ../archive.tar.gz .
No name and/or group mapping for uid,gid:(1001,1001)
mv: ./archive.tar.gz: set owner/group (was: 1001/1001): Operation not permitted
user@freebsd:~/nas % ls -al archive.tar.gz
-rwxr-x---+ 1 user user 46747889 Nov 10 11:37 archive.tar.gz

Is there any way to determine whether the FreeBSD client sends uid/gid instead of name or Truenas can't translate the name, please?
 
Top