NFS server and client daemons
Two daemon processes provide the NFS services on the server:
mountd(NADM)-
Checks for access permissions for the exported filesystem
and returns a pointer to it when a client tries to mount a filesystem.
nfsd(NADM)-
Starts the kernel-based NFS server daemons that handle filesystem
request from clients. After a client mounts an NFS filesystem,
access to that mount point and directories below it goes
through the nfsd daemons on the server.
Other NFS daemons include:
biod(NADM)-
Starts kernel-based daemons on the client that
handle asynchronous block I/O, for read-ahead
and write-behind of blocks from the client's
buffer cache.
portmap(NADM)-
Converts TCP/IP port numbers to RPC (Remote Procedure Call)
program numbers.
The NFS server nfsd registers its port with the local
portmap process. The NFS client accesses the server by
asking the portmap process on the server for NFS's
port number. That port number is used on all subsequent
RPC procedure calls. The RPC mechanism allows client
processes to execute procedure calls on the server as if
the client process were executing the call in its own
address space.
exportfs(NADM)-
Makes a local directory of files available for
mounting over the network by NFS clients.
pcnfsd(NADM)-
Used by machines running the DOS version of NFS.
rwalld(NADM)-
Implements the
rwall(NADM)
service that
broadcasts messages to all users logged in to the network.
rusersd(NADM)-
implements the
rusers(NC)
service that displays the names of users logged in to the
network
These daemons are conventionally started by default when the
system goes into multiuser mode. The startup scripts are
typically located in /etc/rpcinit.
Following is an example of a mount procedure that describes the
tasks and interactions of the client and server daemons, as well
as other programs involved, in order of execution.
The mount command can get its parameters from the
Filesystem Manager, the command line or from the file
/etc/default/filesys.
The following example assumes command-line arguments:
mount -f NFS columbia:/usr/src /columbia.src
On the client:-
-
The mount command opens /etc/mnttab
and checks that this mount was not already done.
-
The mount command parses the first argument into host
columbia and remote directory /usr/src.
-
The mount command then resolves the host
columbia into an Internet protocol address.
-
The mount command calls columbia's
portmap to get the port number of mountd.
-
The mount command calls columbia's
mountd and passes it the /usr/src
pathname.
On the server (columbia):-
-
mountd reads its /etc/exports
and looks for the exported filesystem that contains
/usr/src.
-
mountd does a
nfs_getfh(NS)
system call on /usr/src to get the
fhandle.
-
mountd returns the fhandle to the client.
On the client:-
-
mount does a
mount(S)
system call with the fhandle and
/columbia.src.
-
The mount command checks whether the caller
is root and /columbia.src is a directory.
-
The mount command does a
statfs(S)
call to columbia's NFS server (nfsd).
-
The mount command opens /etc/mnttab
and adds an entry.
See also:
Next topic:
NFS configuration files
Previous topic:
Incompatibilities with distributed filesystems
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005