Sponsored Content
Top Forums UNIX for Advanced & Expert Users NFS server <servername> not responding still trying Post 302525181 by newbie_01 on Thursday 26th of May 2011 03:36:12 AM
Old 05-26-2011
NFS server <servername> not responding still trying

Hi gurus,

OS = SunOS 5.8

Not sure whether to post this in the scripting one or to advance and experts. Am posting on both since there is two things that am wanting to achieve.

Am currerntly having NFS server errors below. At this stage, I am not sure whether I am having a SAN storage issue or a network issue.

Code:
NFS server <servername> not responding still trying

Am leaning towards a SAN storage issue at the moment. Reason I said this is because there is about 10-15 NFS mount from this server and the NFS error is not happening on all of them only for some of them.

If I do a df -k, it lists down the filesytem and then stop on when it start getting NFS server error. For the time being, am wanting to know how to isolate which mount points are having NFS issues, is there a command that I can run that will report on what mount points is NFS having problems with instead of running df which hangs midway?

I thought about writing a script that will scan the /etc/mnttab and run a df of each filesystem in the /etc/mnttab file but unfortunately when it get thru the one that it is having problem with, the script stalls and cannot continue. Is it possible to put a "timer" for the df <filesystem> and if it is taking more than 10secs, it terminates itself and then continue with doing the df of the next filesystem?

To illustrate what am wanting to do, for example, the /etc/mnttab file have the following mount entries:

Code:
/etc/mnttab example:

/nas_mnt/u01
/nas_mnt/u02
/nas_mnt/u03
/nas_mnt/u04
/nas_mnt/u05

I want to have a script that does ...

while read mnt
do
   df -k ${mnt}
done < /etc/mnttab

So what am wanting to achieve is giving df maybe only 10 seconds and if it does not response, then terminate and process the next one in the list.

This is what I have in mind. Will it work?

Code:
   /etc/mnttab example:
   
   /nas_mnt/u01
   /nas_mnt/u02
    /nas_mnt/u03
    /nas_mnt/u04
    /nas_mnt/u05
   
 df.sh:
 df_processid=$$
 echo "${df_processid}" > df.lock
 df -k ${1}
 remove df.lock
 
 
   while read mnt
   do
      df.sh ${mnt} &
    sleep 10
   -- check for df.lock, if it exists, then kill -9 for df_processid
   -- otherwise do nothing
 done < /etc/mnttab

On the other hand, of course it would be best if there is a command that I don't about that can check which of the NFS mounts are having problems and which aren't.

Any response / feedback will be much appreciated. Thanks in advance.

Last edited by newbie_01; 05-26-2011 at 04:53 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

NFS SERVER.....not responding

Hi i am using HPUX11.00 and i am facing a starnge problem after some time when i log on a message is coimng NFS server not responding still trying....and it keps on coming there is no other way but to log out..form the server and start once again... there is no file system exported or NFS... (3 Replies)
Discussion started by: Prafulla
3 Replies

2. UNIX for Dummies Questions & Answers

Solaris 9 server not responding

I'm in panic mode. This isn't a production server, however, is very vital to office. Sun V240 with Solaris 9, stopped accepting ftp sessions. When I tried to remote into box, it didn't respond. I have tried rebooting to boot in single user mode, no luck. I can see that it is ON but I can't get it... (3 Replies)
Discussion started by: mkeis1144
3 Replies

3. Solaris

Locate NFS "not responding still trying" application on client

At times I have unknown applications that hang for long periods of time over and over again after a network glitch. These are sometimes nfs4 but usually nfs3 clients and are always solaris10 systems. nfs: NFS server hostname not responding still trying nfs: NFS server hostname ok nfs: NFS... (1 Reply)
Discussion started by: HPAVC
1 Replies

4. Solaris

Solaris 9 as a nfs client -- centos as a nfs server.

Hello, I have a centos as nfs server, its name is centos_A. After I finish the setup of the nfs server, the other linux can access this nfs server immediately via /net/centos_A/* But, My solaris 9 can not access /net/centos_A/* immediately. I have to leave /net/centos_A, and wait for about... (1 Reply)
Discussion started by: bruceharbin
1 Replies

5. Red Hat

After umount -lf: kernel: nfs: server HOSTNAME not responding, timed out

Greetings! I'm testing a failover solution for NFSv4 on RHEL6 with latest updates. My script umounts (umount -lf /share) the faulty NFS share if it sees that's hanging on the client (the NFS daemon is down on the NFS server) and it mounts the share from another healthy NFS server. Sometimes... (4 Replies)
Discussion started by: Arsene Lupen
4 Replies

6. Red Hat

RHEL5 Server not responding

I have RHEL5 server Sometimes ping timeout occured and i can not access server from any tool or ILOM Any ideas how to solve this? (5 Replies)
Discussion started by: rafat_nasar2010
5 Replies

7. UNIX for Dummies Questions & Answers

Server with OpenVZ virtualisation is not responding but VMs are OK

Server is accessible only via IPMI. SSH and web control panel is timeout. Takes several hours. Server dont have high load or suspicious processes. I checked /etc/hosts.deny and restarted ssh, but nothing :( (0 Replies)
Discussion started by: postcd
0 Replies

8. AIX

AIX NFS Server and NFS Client

Hi 2 ALL, try to run NFS Server in AIX 7.1 : 1. Step by step on NFS Server node mkdir /tmp/test chgrp staff /tmp/test chmod 775 /tmp/test-- create export directory (fs) mknfsexp -d /tmp/test -t ro exportfs -va show mount -e :/# exportfs -av exports: 1831-187 re-exported /tmp/test... (4 Replies)
Discussion started by: penchev
4 Replies

9. UNIX for Beginners Questions & Answers

NFS server xxxxx not responding still trying

Hello, I got the below error on my AIX system when doing a df command NFS server xxx not responding still trying We check and know that the NFS server is not available anymore. So we would like to unmount it, but no help. / > umount /mountpoint/ umount: Could not find anything to... (4 Replies)
Discussion started by: Phat
4 Replies
getmntent(3C)						   Standard C Library Functions 					     getmntent(3C)

NAME
getmntent, getmntany, getextmntent, hasmntopt, putmntent, resetmnttab - get mounted device information SYNOPSIS
#include <stdio.h> #include <sys/mnttab.h> int getmntent(FILE *fp, struct mnttab *mp); int getmntany(FILE *fp, struct mnttab *mp, struct mnttab *mpref); int getextmntent(FILE *fp, struct extmnttab *mp, int len); char *hasmntopt(struct mnttab *mnt, char *opt); int putmntent(FILE *iop, struct mnttab *mp); void resetmnttab(FILE *fp); DESCRIPTION
getmntent() and getmntany() The getmntent() and getmntany() functions each fill in the structure pointed to by mp with the broken-out fields of a line in the mnttab file. Each line read from the file contains a mnttab structure, which is defined in the <sys/mnttab.h> header. The structure contains the following members, which correspond to the broken-out fields from a line in /etc/mnttab (see mnttab(4)). char *mnt_special; /* name of mounted resource */ char *mnt_mountp; /* mount point */ char *mnt_fstype; /* type of file system mounted */ char *mnt_mntopts; /* options for this mount */ char *mnt_time; /* time file system mounted */ Fields with no actual content in /etc/mnttab are represented in the file as "-". To clearly distinguish empty fields, getmntent() set the corresponding field in mp to NULL. Each getmntent() call causes a new line to be read from the mnttab file. Successive calls can be used to search the entire list. The getmn- tany() function searches the file referenced by fp until a match is found between a line in the file and mpref. A match occurs if all non- null entries in mpref match the corresponding fields in the file. These functions do not open, close, or rewind the file. getextmntent() The getextmntent() function is an extended version of the getmntent() function that returns, in addition to the information that getmn- tent() returns, the major and minor number of the mounted resource to which the line in mnttab corresponds. The getextmntent() function also fills in the extmntent structure defined in the <sys/mnttab.h> header. For getextmntent() to function properly, it must be notified when the mnttab file has been reopened or rewound since a previous getextmntent() call. This notification is accomplished by calling resetmnttab(). Otherwise, it behaves exactly as getmntent() described above The data pointed to by the mnttab structure members are stored in a static area and must be copied to be saved between successive calls. hasmntopt() The hasmntopt() function scans the mnt_mntopts member of the mnttab structure mnt for a substring that matches opt. It returns the address of the substring if a match is found; otherwise it returns 0. Substrings are delimited by commas and the end of the mnt_mntopts string. putmntent() The putmntent() function is obsolete and no longer has any effect. Entries appear in mnttab as a side effect of a mount(2) call. The func- tion name is still defined for transition purposes. resetmnttab() The resetmnttab() function notifies getextmntent() to reload from the kernel the device information that corresponds to the new snapshot of the mnttab information (see mnttab(4)). Subsequent getextmntent() calls then return correct extmnttab information. This function should be called whenever the mnttab file is either rewound or closed and reopened before any calls are made to getextmntent(). RETURN VALUES
getmntent() and getmntany() If the next entry is successfully read by getmntent() or a match is found with getmntany(), 0 is returned. If an EOF is encountered on reading, these functions return -1. If an error is encountered, a value greater than 0 is returned. The following error values are defined in <sys/mnttab.h>: MNT_TOOLONG A line in the file exceeded the internal buffer size of MNT_LINE_MAX. MNT_TOOMANY A line in the file contains too many fields. MNT_TOOFEW A line in the file contains too few fields. hasmntopt() Upon successful completion, hasmntopt() returns the address of the substring if a match is found. Otherwise, it returns 0. putmntent() The putmntent() is obsolete and always returns -1. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
mount(2), mnttab(4), attributes(5) SunOS 5.11 22 Mar 2004 getmntent(3C)
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy