Discussion:
Restarting exports disturbs NFS clients
(too old to reply)
Daniel Feenberg
2013-05-04 19:08:43 UTC
Permalink
When we change the exportfs file on our FreeBSD 9.1 fileserver and signal
mountd to reread the file:

kill -HUP `cat /var/run/mountd.pid`

it kills the jobs on clients that have files open on the fileserver. They
terminate with an I/O error. The same thing happens if NFS is restarted.

This is pretty inconvenient for users (and us). Is there a way around
this? We have noticed that a Linux fileserver can restart nfs without
distrubing clients (other than a short pause). The Linux restart doesn't
restart the locking mechanism - is that the difference? We could do
without locks, even without NFSv4, for that matter, if it would let us
change exports without disturbing users. Perhaps there is an NFS shutdown
procedure that we should be using?

Daniel Feenberg
NBER
Jeremy Chadwick
2013-05-04 19:13:23 UTC
Permalink
Post by Daniel Feenberg
When we change the exportfs file on our FreeBSD 9.1 fileserver and signal
kill -HUP `cat /var/run/mountd.pid`
it kills the jobs on clients that have files open on the fileserver. They
terminate with an I/O error. The same thing happens if NFS is restarted.
This is pretty inconvenient for users (and us). Is there a way
around this? We have noticed that a Linux fileserver can restart nfs
without distrubing clients (other than a short pause). The Linux
restart doesn't restart the locking mechanism - is that the
difference? We could do without locks, even without NFSv4, for that
matter, if it would let us change exports without disturbing users.
Perhaps there is an NFS shutdown procedure that we should be using?
http://svnweb.freebsd.org/base/stable/9/usr.sbin/mountd/mountd.c?view=log

See commit r243739.

TL;DR -- Try running stable/9 instead of 9.1-RELEASE.
--
| Jeremy Chadwick ***@koitsu.org |
| UNIX Systems Administrator http://jdc.koitsu.org/ |
| Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |
Rick Macklem
2013-05-04 21:23:37 UTC
Permalink
Post by Jeremy Chadwick
Post by Daniel Feenberg
When we change the exportfs file on our FreeBSD 9.1 fileserver and
signal
kill -HUP `cat /var/run/mountd.pid`
it kills the jobs on clients that have files open on the fileserver.
They
terminate with an I/O error. The same thing happens if NFS is
restarted.
This is pretty inconvenient for users (and us). Is there a way
around this? We have noticed that a Linux fileserver can restart nfs
without distrubing clients (other than a short pause). The Linux
restart doesn't restart the locking mechanism - is that the
difference? We could do without locks, even without NFSv4, for that
matter, if it would let us change exports without disturbing users.
Perhaps there is an NFS shutdown procedure that we should be using?
http://svnweb.freebsd.org/base/stable/9/usr.sbin/mountd/mountd.c?view=log
See commit r243739.
TL;DR -- Try running stable/9 instead of 9.1-RELEASE.
If the above doesn't work for you, the other alternative is to switch
from using mountd to nfse, which can be found on sourceforge.

rick
Post by Jeremy Chadwick
--
| UNIX Systems Administrator http://jdc.koitsu.org/ |
| Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
Loading...