[Pkg-sysvinit-devel] Why do we fall back to trying /sbin/portmap?
Miquel van Smoorenburg
miquels at cistron.nl
Thu Jan 12 09:49:10 UTC 2006
On Thu, 2006-01-12 at 09:24 +0100, Petter Reinholdtsen wrote:
> [Miquel van Smoorenburg]
> > Yes, you do need it for that. Clients need to run rpc.rstatd so that
> > the rpc.lockd on the server can check to see if a client is still
> > alive, or has rebooted, in order to potentially invalidate any stale
> > locks. Ofcourse rpc.rstatd needs to register with the portmapper.
>
> This all sounds sensible until I discovered that neither statd nor
> lockd is started until later in the process (in init.d/nfs-common),
That is not true. In 2.4 and 2.6 kernels, rpc.lockd is started by the
kernel as a kernel thread as soon as you mount an NFS filesystem.
It's nfs_fill_super -> lockd_up -> svc_makesock ->
[ ..svc_* .. ] -> rpc_register (in 2.6 at least)
Before any NFS filesystem is mounted, portmap must be running or
rpc.lockd can't register itself. Yes, rpc.statd is a user-level daemon
that is started later; I confused the two, sorry. It's been a while
since I've looked at nfs client kernel internals.
Lots of things (ideally, all :) )in the existing init scripts are there
for a reason.
Mike.
More information about the Pkg-sysvinit-devel
mailing list