Centos – How to Monitor NFS on centos 7 + enable nfs debug


Do Not Use the no_root_squash Option
By default, NFS shares change the root user to the nfsnobody user, an unprivileged user account. In this way, all root-created files are owned by nfsnobody, which prevents uploading of programs with the setuid bit set.
If no_root_squash is used, remote root users are able to change any file on the shared file system and leave trojaned applications for other users to inadvertently execute.


1. To view available rpcdebug modules, run:

rpcdebug -vh
-m : module name to set or clear kernel debug flags
-s : To set available kernel debug flag for a module
-c : Clear Kernel debug flags

Enable debugging – Examples

1. Enable all NFS (client-side) debugging
To enable NFS debugging on the client :

rpcdebug -m nfs -s all

2. Enable NFSD (server-side) lockd debugging
To enable server side nfsd lockd debugging:

rpcdebug -m nfsd -s lockd

3. Enable RPC Call debugging
To enable RPC call debugging :

rpcdebug -m rpc -s call

Disable debugging

To disable debugging, use the -c (clear) option, for example:

rpcdebug -m nfs -c all
rpcdebug -m nfsd -c all