[379] in linux-net channel archive
Running several nfsd's in parallel
daemon@ATHENA.MIT.EDU (Olaf Kirch)
Fri May 26 20:53:48 1995
From: okir@monad.swb.de (Olaf Kirch)
To: linux-net@vger.rutgers.edu
Date: Sat, 27 May 1995 01:39:57 +0200 (MET DST)
Thomas Koenig wrote:
> Some time ago, you could run two nfsds in parallel on the same machine;
> they bound to the same port and took turns serving requests.
>
> Now, when you start up two of them (and uncomment the TCP part, which
> complains about the socket already being in use), both run, but only
> one of them gets any packets sent to port 2049.
Hm, I recently tried that on 1.2.5 and it worked. What I did was add
some code to nfsd that bound the socket first and then forked. (You'll
find that code ifdef'ed out in nfsd.c in 2.2alpha). The other way round
won't work with newer kernels.
(If it did work, this would indeed be a bad situation. Any user could
start listening on port 2049 and intercept NFS traffic. It's spoof
time:-)
When running several nfsd's, you have to be careful however. Because
of the way file handles are currently constructed, you can only do read
exporting this way; with write operations such as rename, you will wind
up with inconsistent file handle caches in your nfsd incarnations.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@monad.swb.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
For my PGP public key, finger okir@brewhq.swb.de.