Subject: Re: NFS remount option
To: Erik E. Fair <fair@clock.org>
From: Frank van der Linden <frank@wins.uva.nl>
List: current-users
Date: 05/26/1998 12:37:32
On Tue, May 26, 1998 at 01:50:50AM -0700, Erik E. Fair wrote:
> NFS server is rebooted.
> NFS client complains of stale filehandles.
> filesystem must be remounted.
> filesystem cannot be unmounted - busy.
> attempts to remount or update fail.
> RTFM fails.
> 
> Under SunOS, there is a "remount" option. How is this accomplished under
> NetBSD, and where is it documented?

"remount" is just the same as our -u option, as far as I know. This
won't help you much in this case (and I'm not sure it would help
you under SunOS either).

If you reboot a server to a state where filehandles will be different
(say, you tar up a filesystem, then newfs it, and untar it again),
you'll be forced to reboot the client. What would need to be done
on the client side is to either 1) flush all vnodes and reinit them
so that the right filehandles are once again associated with them
(this is really the same as unmount + mount, but you can't, since some
vnodes are busy), or 2) somehow get new filehandles for all vnodes
currently in use (but you can't, this would essentially require a
full pathname for each vnode to be stored, so that a re-lookup can be done).

After a normal reboot, there shouldn't be many stale NFS handles,
and the new that do appear should not appear in any critical places,
and can be fixed by restarting applications.

If they, for some reason, are numerous, you'll just have to reboot
the client.

- Frank