Linux NFS development
 help / color / mirror / Atom feed
From: Wade Hampton <wade.hampton@nsc1.net>
To: nfs@lists.sourceforge.net
Subject: df hangs on down nfs server mounted with hard,intr, can't kill
Date: Tue, 09 Mar 2004 14:33:01 -0500	[thread overview]
Message-ID: <404E1BED.7090608@nsc1.net> (raw)

[I posted this to the Fedora list yesterday.]

I have a Fedora server with kernel 2.4.22-1-2163 SMP mounting a
remote solaris server (hence choice of options):

  rsize=32768,ro,hard,intr,tcp,nfsvers=3

When the remote is down or disconnected, a "df" hangs (as expected),
but I can't kill it, even as root or with kill -9.  The docs for mount 
indicate
that the INTR option should allow for killing apps mounted with HARD.
Is this a bug (glibc, 2.4 kernel, NFS, or Fedora's kernel)?

I also coded a test program that calls statvfs(2) and it hangs on
the statvfs(2) call when run against a down NFS server.  It too
can't be interrupted or killed.

My questions are:

1)  Is there a safe and reliable means to check for a down NFS server
    (e.g., is showmount -e <server> safe enough?)

2)  Is the non-interruptable operation (even with INTR option)
    a bug or feature?

3)  Is there a simple kernel call, /proc entry, or similar that can
   be used to reliably check for free/used disk space and for a down
   host, without hanging my application?
  
       A showmount -e followed by a statvfs() might work, but
       there is the possibility of losing the host between the two
       calls, resulting in an application hang.

4)  Is there a perl module to accomplish this?

This would be very useful for network monitoring, e.g., when the
server goes down and stays down for >1 minute, generate an SNMP
trap and write to a log file.  It would be good if you can't put an SNMP
agent on the server, but only on the client.  It is also useful for writing
a highly reliable client application.

As I have no control over the remote system, when it went down,
I had to do a hard reboot of my Linux box to stop the hung apps.  This
is a Windows solution, not a Linux solution....
 
Note, I found this when writing some scripts for MRTG to check
the disk utilization of partitions.  My df's hung so I didn't even get
the proper values for my local partitions.  After a few days, I had
LOTS of hung MRTG apps and had to reboot (this test server is
down for a week or two).

Thanks
-- 
Wade Hampton


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

             reply	other threads:[~2004-03-09 19:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09 19:33 Wade Hampton [this message]
2004-03-10  2:40 ` df hangs on down nfs server mounted with hard,intr, can't kill Ian Kent
  -- strict thread matches above, loose matches on Subject: below --
2004-03-09 19:51 Lever, Charles
2004-03-09 20:08 ` Wade Hampton
2004-03-10  8:09 ` Olaf Kirch
2004-03-10 19:18   ` Trond Myklebust
2004-03-11  9:31     ` Olaf Kirch
2004-03-11 19:44       ` Trond Myklebust
2004-03-12  8:54         ` Olaf Kirch
2004-03-15  5:21     ` Yusuf Goolamabbas
2004-03-15 17:03       ` Trond Myklebust
2004-03-15 18:15         ` Steve Dickson
2004-03-15 22:57 df hangs on down nfs server mounted with hard,intr,can't kill Lever, Charles
2004-03-16  2:26 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=404E1BED.7090608@nsc1.net \
    --to=wade.hampton@nsc1.net \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox