How do I get reasonable server-side NFS log output?

4

I was experiencing some problems with nfs-kernel-server on Debian stretch which I could solve by luck. Still, I learned that the log output was not of much help of me. I would like to change that to extend my NFS-problem-solving capabilities.

This is my /etc/exportfs file:

/srv/nfs/magicbox_rootfs 127.0.0.0/8(rw,no_root_squash,async,no_subtree_check,insecure)

When that line is commented, i.e. when I don't have access rights on my local machine, following connection attempt does not have any effect on

  • /log/syslog
  • /log/messages
  • /log/dmesg
  • /log/kern.log
  • /log/debug
  • /log/daemon.log

:

sudo mount -v -t nfs 127.0.0.1:/srv/nfs/magicbox_rootfs /tmp/mountdir/

My own solving attempts

When I run

sudo rpcdebug -m nfsd -s

as this page recommends, connection attempts do generate a entry in /log/kern.log, but it is rather meaningless:

Aug 31 11:49:43 manuelthinkpad kernel: [125549.999823] nfsd_dispatch: vers 4 proc 0

Can someone suggest how I achieve meaningful NFS log entries? I'm under the impression NFS does not do any logging by itself, but rather relies on third-party deamons and tools to do the logging for it. However, this doesn't make it easier for new users like me.

Multisync

Posted 2017-08-31T09:55:07.340

Reputation: 209

I don't know about reasonable, but to prevent multiple GB of verbose NFSD and NFS logs in kern.log and syslog, i disabled logs completely:

sudo rpcdebug -m nfsd -c and sudo rpcdebug -m nfs -c – Raphael – 2018-01-05T13:05:48.590

No answers