All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sven Köhler" <skoehler@upb.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net
Subject: Re: why do i get "Stale NFS file handle" for hours?
Date: Sun, 05 Sep 2004 03:51:21 +0200	[thread overview]
Message-ID: <413A7119.2090709@upb.de> (raw)
In-Reply-To: <1094348385.13791.119.camel@lade.trondhjem.org>

> Of course we could "fix" things for the user so that we just look up all
> those filehandles again transparently.
> 
>   The real question is: how do we know that is the right thing to do?
> 
> The NFS client wouldn't know the difference between your /etc/passwd
> file and a javascript pop-up ad. If it gets an ESTALE error, then that
> tells it that the original filehandle is invalid, but it does not know
> WHY that is the case. The file may have been deleted and replaced by a
> new one. It may be that your server is broken, and is actually losing
> filehandles on reboot (as appears to be the case in your setup),...

I agree, but you simply admit that the NFS client doesn't seem to know, 
when the server was restart. The simpliest thing i can imagine, is that 
the NFS server generates a random integer-value at start, and transmits 
it along with ESTALE. If the integer-value is different from the 
integer-value the server send while mounting the FS, than the kernel has 
to remount it transparently. This is a simple thing so that a client can 
safely determine, if the server has been restarted, or not, and it only 
adds 4 byte to some nfs-packets.

> Reopening the file, and then continuing to write from the same position
> may be the right thing to do, but then again it may cause you to
> overwrite a bunch of freshly written password entries.

In my case, if the nfs directory is mounted to /mnt/nfs, i can't even do 
a simple "cd /mnt/nfs" without getting the "stale nfs handle" - even if 
i use a different shell. I always thought, that the "cd /mnt/nfs" should 
work, since the shell will aquire a new handle, but it doesn't work :-(

So i'm not really talking about restoring all file-handles. The 
filehandles that were still open while the server restarted may stay 
broken, but i'd like to be abled to open new ones at last.

> So we bounce the error up to userland where these issues can actually be
> resolved.

This is a good thing to do in general, but i think this needs improvement.

  reply	other threads:[~2004-09-05  1:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-05  1:06 why do i get "Stale NFS file handle" for hours? Sven Köhler
2004-09-05  1:39 ` Trond Myklebust
2004-09-05  1:39   ` Trond Myklebust
2004-09-05  1:51   ` Sven Köhler [this message]
2004-09-05  2:02     ` Trond Myklebust
2004-09-05  2:02       ` Trond Myklebust
2004-09-05  2:23       ` Sven Köhler
2004-09-05  3:01         ` Trond Myklebust
2004-09-05  3:01           ` Trond Myklebust
2004-09-05  8:17           ` Tim Connors
2004-09-05  8:17             ` Tim Connors
2004-09-05  8:59             ` Florian Weimer
2004-09-05  9:02               ` Tim Connors
2004-09-05 16:20             ` Mike Jagdis
2004-09-06  1:32               ` Tim Connors
2004-09-05 13:18           ` Sven Köhler
2004-09-05 20:10             ` Trond Myklebust
2004-09-05 20:10               ` Trond Myklebust
2004-09-06  7:47               ` Kalin KOZHUHAROV
2004-09-06  9:57           ` David Woodhouse
2004-09-06 15:59             ` Trond Myklebust
2004-09-06 15:59               ` Trond Myklebust
2004-09-07  0:55           ` [NFS] " Greg Banks
2004-09-06  6:47 ` Frank Steiner

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=413A7119.2090709@upb.de \
    --to=skoehler@upb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.