How to debug NFS issues
This document (7011571) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
Novell Open Enterprise Server 11 (OES 11) Linux
Novell Open Enterprise Server 2 (OES 2) Linux
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Desktop 11
Situation
Resolution
- Set up the environment so that the problematic behavior can be reproduced immediately. It only makes sense to enable additional debugging when the issue is directly reproduced and no other distracting logs have to be read and analysed. So the basic steps should always be:
- Enable debugging
- Promptly reproduce the issue
- Disable debugging
- rpcdebug is very helpful in analysing the NFS or RPC communication. If you want to get additional logging information from the NFS Server aka nfsd use this command:
rpcdebug -m nfsd all:
for NFS client analysis use:
rpcdebug -m nfs all
Please note that the previous command uses "nfs" instead of "nfsd" as a parameter to option -m.
In rare cases the RPC protocol needs to be debugged and that can be achieved by using:
rpcdebug -m rpc all
The additional logging information will appear in /var/log/messages or can be viewed with the command "dmesg".
Disable the respective debugging options again by using the option -c in front of the trailing all:
rpcdebug -m nfsd -c all
rpcdebug -m nfs -c all
rpcdebug -m rpc -c all
Please note that it can be helpful when analysing a NFS server issue to enable the debugging on the client at the same time to see how the communication looks on both sides. - If all of the above rpc commands didn't provide enough or detailed information, advanced logging on kernel level with sysctl should be considered. It is not recommended to mix rpcdebug and the following sysctl commands since this would fill up the logs rapidly and would make them hardly readable. As a start only one of them should be used for debugging purposes.
To enable additional logging for nfsd use:
sysctl -w sunrpc.nfsd_debug=1023
for an NFS client issue:
sysctl -w sunrpc.nfs_debug=1023
and finally for RPC:
sysctl -w sunrpc.rpc_debug=1023
These commands also lead to additional messages in /var/log/messages that can be viewed via "dmesg" as well.
The respective debugging can be disabled by using the same commands like above, but change "1023" to "0":
sysctl -w sunrpc.nfsd_debug=0
or
sysctl -w sunrpc.nfs_debug=0
or
sysctl -w sunrpc.rpc_debug=0
Disclaimer
This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7011571
- Creation Date:03-JAN-13
- Modified Date:03-JAN-13
- NovellOpen Enterprise Server
- SUSESUSE Linux Enterprise DesktopSUSE Linux Enterprise Server
Did this document solve your problem? Provide Feedback