centos 6 nfs: logs not showing anywhere
I've just had the same problem in 2016, using CentOS 6.5 on my workstation, and CentOS 7 on the client (a Vagrant box on the same host). My specific problem was the same as the OP's, I couldn't find any nfsd logging.
Use rpcdebug to Enable NFS Logging
The answer for me, for anyone else coming to this question in the future, was to use the command (as root/sudo on the server end):
rpcdebug -m nfsd all
to turn on full debugging to /var/log/messages
This will enable the kind of output shown in ewwhite's post above when you issue the mount command from the client.
to turn off again, use
rpcdebug -m nfsd -c all
you can reduce the amount of debug info by replacing the keyword 'all' with a specific module. These are listed in
man rpcdebug
Add Startup Flags to rpc.mountd and rpc.idmapd to Increase Debug
You can get more debug info by adding -d all
to rpc.mountd and -vvv
to rpc.idmapd.
Do this by editing `/etc/sysconfig/nfs' and setting:
...
RPCMOUNTDOPTS=" -d all"
...
RPCIDMAPDARGS="-vvv"
...
You will need to restart the nfs service (as root/sudo) for this to apply:
service nfs restart
This is the CentOS 6.n approach. Under CentOS 7 you would need to look at systemctl restart [servicename]
instead. [servicename] may well be nfs but I haven't done this under CentOS 7 yet.
For clarity, these debug log messages will be written to /var/log/messages
.
Did you look in /var/log/messages
? NFS logs there.
Dec 7 08:36:25 OGC_Mirror kernel: RPC: Registered named UNIX socket transport module.
Dec 7 08:36:25 OGC_Mirror kernel: RPC: Registered udp transport module.
Dec 7 08:36:25 OGC_Mirror kernel: RPC: Registered tcp transport module.
Dec 7 08:36:25 OGC_Mirror kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Dec 7 08:36:25 OGC_Mirror kernel: Installing knfsd (copyright (C) 1996 [email protected]).
Dec 7 08:36:25 OGC_Mirror rpc.mountd[2459]: Version 1.2.3 starting
Dec 7 08:36:25 OGC_Mirror kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Dec 7 08:36:25 OGC_Mirror kernel: NFSD: starting 90-second grace period