[SOLVED] CentOs v7 NFS4 client and id mapping with CentOs v6 NFS4 server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CentOs v7 NFS4 client and id mapping with CentOs v6 NFS4 server
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.
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:
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?
I checked the link from ferrari and sure enough, the UID comes across on the CentOs 7 host=client7 as 65534 (nfsnobody). I'll dig deeper. One question on this, from what I've read I don't really need rpc.idmapd running on a NFS4 client, is that correct?
I've tried enabled/started and stopped/disabled idmapd, but it didn't make any difference so I'm assuming idmapd doesn't need to be running on a NFS4 client.
thanks ferrari -- Dean
Elsewhere I see discussion of the use of nfsidmap in CentOs 7. So following the person's discussion. I checked the status of id_resolver and it is running on the new CentOs 7 client.
[root@client7 ~]# dmesg | grep id_resolver
[ 10.231881] NFS: Registering the id_resolver key type
[ 10.231889] Key type id_resolver registered
Next I went ahead and cleared the cached values on the client7 with
nfsidmap -v -c
nfsidmap: '.id_resolver' cleared
Then listed the directory and as before with -n and it still incorrectly showed 65534 (nfsnobody).
[root@client7 ~]# ls -ldn /var/www/html/ceramext
drwxr-xr-x 17 65534 0 4096 Mar 24 2017 /var/www/html/ceramext
And then I checked the id_resolv value in the keys
I see what the problem is. I'm using proxmox 6 as my virtual infrastructure host (PVE). I must have all of the users mapped into the /etc/passwd of the PVE host in order for the ID mapping to be passed properly to the container (client7). This wasn't necessary with proxmox version 3 (my current version) but is necessary apparently with the newer proxmox 6 PVE.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.