CentOs v7 NFS4 client and id mapping with CentOs v6 NFS4 server
by deanguenther from LinuxQuestions.org on (#4RD62)
I have a CentOs v6 NFS4 server (host=server6) and CentOs v6 NFS4 client (host=client6) which have been working well together for years. For various reasons, I want to stay with NFS4.
The server6 and client6 have the same idmapd.conf
[General]
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = mydomain.com
[Mapping]
Nobody-User = nfsnobody
Nobody-Group = nfsnobody
[Translation]
Method = nsswitch
On the server6 host these nfs services are running
rpc.statd
rpc.idmapd
rpc.rquotad
When I list a directory from host client6 it properly shows the ID as mapped. For example:
[root@client6 ~]# ls -ld /var/www/html/ceramext/
drwxr-xr-x. 17 ceramext root 4096 Mar 24 2017 /var/www/html/ceramext/
Where "ceramext" is the owner of that directory.
Now I've added a new CentOs v7 client into the mix (host=client7). Same idea for idmapd.conf:
[General]
Domain = mydomain.com
[Mapping]
Nobody-User = nfsnobody
Nobody-Group = nfsnobody
[Translation]
Method = nsswitch
All of the mount points from server6 mount fine on the new client7 host, but the ID is not mapped properly. It shows as nfsnobody instead of user ceramext:
[root@client7 ~]# ls -ld /var/www/html/ceramext/
drwxr-xr-x 17 nfsnobody root 4096 Mar 24 2017 /var/www/html/ceramext/
I've verified that all three hosts have the same UID:GID of "507:100" for user ceramext in their respective /etc/passwd file:
# grep ceramext /etc/passwd
ceramext:x:507:100::/web/ceramext:/bin/bash
And the /etc/shadow is synched up as well.
I did find a thread where somebody suggested changing the Domain in the idmapd.conf to "localdomain" which I tried on all three hosts, but it didn't make any difference.
Both client6 and client7 have the same mount point to server7 in /etc/fstab:
# grep html /etc/fstab
server7:/html /var/www/html nfs4 rw,hard,intr,proto=tcp,port=2049,auto,exec 0 0
Note that systems have all been restarted and no change on the new CentOs client7 host.
I don't think it should matter, but client6 and server6 are physical and client7 is virtual (proxmox v6 privileged container).
I'm at a loss as to why the NFS4 ID is not mapping correctly on the new CentOs 7 client. What do I check next?
thanks- Dean


The server6 and client6 have the same idmapd.conf
[General]
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = mydomain.com
[Mapping]
Nobody-User = nfsnobody
Nobody-Group = nfsnobody
[Translation]
Method = nsswitch
On the server6 host these nfs services are running
rpc.statd
rpc.idmapd
rpc.rquotad
When I list a directory from host client6 it properly shows the ID as mapped. For example:
[root@client6 ~]# ls -ld /var/www/html/ceramext/
drwxr-xr-x. 17 ceramext root 4096 Mar 24 2017 /var/www/html/ceramext/
Where "ceramext" is the owner of that directory.
Now I've added a new CentOs v7 client into the mix (host=client7). Same idea for idmapd.conf:
[General]
Domain = mydomain.com
[Mapping]
Nobody-User = nfsnobody
Nobody-Group = nfsnobody
[Translation]
Method = nsswitch
All of the mount points from server6 mount fine on the new client7 host, but the ID is not mapped properly. It shows as nfsnobody instead of user ceramext:
[root@client7 ~]# ls -ld /var/www/html/ceramext/
drwxr-xr-x 17 nfsnobody root 4096 Mar 24 2017 /var/www/html/ceramext/
I've verified that all three hosts have the same UID:GID of "507:100" for user ceramext in their respective /etc/passwd file:
# grep ceramext /etc/passwd
ceramext:x:507:100::/web/ceramext:/bin/bash
And the /etc/shadow is synched up as well.
I did find a thread where somebody suggested changing the Domain in the idmapd.conf to "localdomain" which I tried on all three hosts, but it didn't make any difference.
Both client6 and client7 have the same mount point to server7 in /etc/fstab:
# grep html /etc/fstab
server7:/html /var/www/html nfs4 rw,hard,intr,proto=tcp,port=2049,auto,exec 0 0
Note that systems have all been restarted and no change on the new CentOs client7 host.
I don't think it should matter, but client6 and server6 are physical and client7 is virtual (proxmox v6 privileged container).
I'm at a loss as to why the NFS4 ID is not mapping correctly on the new CentOs 7 client. What do I check next?
thanks- Dean