In any network- related problem, first use the ping command to ensure that network is operational. Most NFS problems are related to either the configuration or NFS daemons. The /etc/exports file on an NFS server and the /etc/fstab file on a client are important to check for any configuration problem. You should also verify that all required daemons are running on the server and client. The order of starting NFS daemons also matters. For example, rpcbind or portmap should be started before starting the nfsd daemon. Similarly, the inetd daemon, which serves ARPA/Berkley and RPC services, must be started after NFS daemons have been started. HP-UX provides some commands for NFS troubleshooting. Some of these are discussed here.
This command verifies if a service is registered with portmap or rpcbind and is running. It contacts the rpcbind or portmap daemon and displays all registered services. A short listing of all the registered services can be displayed using the -s command-line switch as shown here.
# rpcinfo -s program version(s) netid(s) service owner 100000 2,3,4 udp,tcp,ticlts,ticotsord,ticots rpcbind superuser 100024 1 tcp,udp status superuser 100021 2,4,3,1 udp,tcp nlockmgr superuser 100020 1 tcp,udp llockmgr superuser 100068 5,4,3,2 udp cmsd superuser 100083 1 tcp ttdbserver superuser 100005 3,1 tcp,udp mountd superuser 100003 3,2 udp nfs superuser 100069 1 tcp,udp ypxfrd superuser 100028 1 udp,tcp ypupdated superuser 100029 2,1 ticots,ticotsord,ticlts keyserv superuser 100004 1,2 tcp,udp ypserv superuser 100009 1 udp yppasswdd superuser 100007 1,2 udp,tcp ypbind sys #
Here you should find rpcbind , mountd , and nfs registered under the service column of the output. You can also find a list of RPC registered services on a remote host using the remote host name as the command-line argument. The following command lists all registered RPC services on host hp0 .
rpcinfo hp0
To verify that a service is listening to your requests and responding, make a UDP or TCP call to a particular service. The following command makes a UDP call to the nfs service on host myhp .
# rpcinfo -u myhp nfs program 100003 version 2 ready and waiting program 100003 version 3 ready and waiting #
The output shows that the host is listening to NFS requests and accepting version 2 and version 3 requests. Other options used with the rpcinfo command are shown in Table 33-4. All of these options can be used with a host name on the command line to find information about a particular host on the network.
Option | Description |
---|---|
-d | Deletes the registration of a particular program |
-m | Displays statistics of RPC operation |
-p | Probes rpcbind using version 2 of rpcbind |
-s | Displays a short list |
-t | Makes an RPC call using TCP |
-u | Makes an RPC call using UDP |
The nfsstat command displays NFS activity on a host. By default it displays information about the client, server and RPC. Different command-line options can be used to display information about the NFS client or server only. The following is the output of the command used without any option.
# nfsstat Server rpc: Connection oriented: N/A Connectionless oriented: calls badcalls nullrecv 55769 0 0 badlen xdrcall dupchecks 0 0 3397 dupreqs 1 Server nfs: calls badcalls 55769 0 Version 2: (0 calls) null getattr setattr 0 0% 0 0% 0 0% root lookup readlink 0 0% 0 0% 0 0% read wrcache write 0 0% 0 0% 0 0% create remove rename 0 0% 0 0% 0 0% link symlink mkdir 0 0% 0 0% 0 0% rmdir readdir statfs 0 0% 0 0% 0 0% Version 3: (55769 calls) null getattr setattr 1 0% 243 0% 2155 3% lookup access readlink 48700 87% 1181 2% 0 0% read write create 5 0% 883 1% 359 0% mkdir symlink mknod 0 0% 0 0% 0 0% remove rmdir rename 0 0% 0 0% 0 0% link readdir readdir+ 0 0% 0 0% 1389 2% fsstat fsinfo pathconf 47 0% 1 0% 0 0% commit 805 1% Client rpc: Connection oriented: N/A Connectionless oriented: calls badcalls retrans 1529 0 0 badxids timeouts waits 0 0 0 newcreds badverfs timers 0 0 16 toobig nomem cantsend 0 0 0 bufulocks 0 Client nfs: calls badcalls clgets 1529 0 1529 cltoomany 0 Version 2: (503 calls) null getattr setattr 0 0% 3 0% 0 0% root lookup readlink 0 0% 0 0% 0 0% read wrcache write 0 0% 0 0% 0 0% create remove rename 0 0% 0 0% 0 0% link symlink mkdir 0 0% 0 0% 0 0% rmdir readdir statfs 0 0% 0 0% 500 99% Version 3: (1026 calls) null getattr setattr 0 0% 12 1% 0 0% lookup access readlink 0 0% 6 0% 0 0% read write create 0 0% 0 0% 0 0% mkdir symlink mknod 0 0% 0 0% 0 0% remove rmdir rename 0 0% 0 0% 0 0% link readdir readdir+ 0 0% 0 0% 0 0% fsstat fsinfo pathconf 1006 98% 2 0% 0 0% commit 0 0% #
Fields like badcalls , nullrecv , badlen , and timeout show errors. Pay special attention to these fields. Options used with this command are listed in Table 33-5.
Option | Description |
---|---|
-c | Displays client information |
-s | Displays server information |
-r | Displays information about RPC |
-m | Displays information about all mounted file systems |
-z | Can be used by the superuser only; displays NFS information and then reinitializes it |
Top |