[CentOS] NFS Mount: files owned by nobody

Wed Mar 19 19:16:52 UTC 2014
Lists <lists at benjamindsmith.com>

Alas, this doesn't seem to have resolved the issue. (See results shown 
below) Your notes closely mirror the results of my google searches. Is 
there a way to have NFS server/client be very verbose and log where the 
error is occuring?

-Ben


On 03/17/2014 03:20 PM, Frank Cox wrote:
> On Mon, 17 Mar 2014 15:10:28 -0700
> Lists wrote:
>
>> When I try to NFS (v4) mount a directory, the user/group ownership shows
>> up as user "nobody" even though /etc/passwd has values for the correct
>> user names. How do I get it to mount with the correct user IDs?
> Hello Mr. Lists:
My name is Ben :)

>
> Here are my notes that cover this occurrence.
>
> If all users come up as nobody on a nfs mount:
>
> Add nfs server name to the Domain = line in /etc/idmapd.conf on both the server and the clients, i.e. Domain = example.com

On the server:
[root at hume ~]# grep Domain /etc/idmapd.conf
Domain = hume.mycompany.com

And the client:
[root at bender ~]#  grep Domain /etc/idmapd.conf
#Domain = local.domain.edu
Domain = hume.mycompany.com


>
> /sbin/service rpcidmapd restart
> /sbin/service nfslock restart
> /sbin/service nfs restart

Server:
[root at hume ~]# /sbin/service rpcidmapd restart
Shutting down RPC idmapd:                                  [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
[root at hume ~]# /sbin/service nfslock restart
Stopping NFS locking:                                      [  OK  ]
Stopping NFS statd:                                        [  OK  ]
Starting NFS statd:                                        [  OK  ]
[root at hume ~]# /sbin/service nfs restart
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Shutting down RPC idmapd:                                  [  OK  ]
Starting NFS services:                                     [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]


And the client: (nfs service wasn't previously running)
[root at bender ~]# /sbin/service rpcidmapd restart
Shutting down RPC idmapd:                                  [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
[root at bender ~]# /sbin/service rpcidmapd restart
Shutting down RPC idmapd:                                  [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
[root at bender ~]# /sbin/service nfslock restart
Stopping NFS statd:                                        [  OK  ]
Starting NFS statd:                                        [  OK  ]
[root at bender ~]# /sbin/service nfs restart
Shutting down NFS daemon:                                  [FAILED]
Shutting down NFS mountd:                                  [FAILED]
Shutting down NFS quotas:                                  [FAILED]
Shutting down RPC idmapd:                                  [  OK  ]
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]



> Also, the complete hostname as specified (example.com) must be in /etc/hosts on the nfs clients as well as the server
>
>

[root at hume ~]# grep hume /etc/hosts
192.168.254.9    hume.mycompany.com hume
[root at hume ~]# exportfs -ra
[root at hume ~]# hostname
hume.mycompany.com
[root at hume ~]#


[root at bender ~]# grep hume /etc/hosts
192.168.254.9    hume.mycompany.com hume
[root at bender ~]# umount /home/spfs.450
[root at bender ~]# /bin/mount -t nfs hume.mycompany.com:/home/spfs.450 
/home/spfs.450
[root at bender ~]# ls -ln /home/spfs.450/
drwxr-xr-x  3 99 99  3 Oct  8  2009 y.spfs
drwxr-xr-x  3 99 99  3 Feb  1  2010 yts.spfs
--SNIP--