The explicit mount process
The following occurs when an administrator mounts a resource by using
the command line:
mount -F nfs -o ro,soft dancer:/usr/src /usr/src/dancer.src
-
The generic mount (/sbin/mount) command verifies that
the mount point is a full pathname and that there is a file
/usr/lib/fs/nfs/mount. /sbin/mount then passes all
the relevant arguments and options to /usr/lib/fs/nfs/mount,
which takes control of the process.
NOTE:
When we say mount from now on in this section, we will be
referring to the NFS-specific mount command
(/usr/lib/fs/nfs/mount).
-
mount then opens
/etc/mnttab and checks that the mount was not previously done.
-
mount parses the argument dancer:/usr/src
(server:path) into host dancer and remote
directory /usr/src.
-
mount calls dancer's
rpcbind to get the port number of dancer's
mountd.
-
mount calls dancer's mountd daemon and
passes it /usr/src, requesting it to send a file handle
(fhandle) for the directory.
-
The server's mountd
daemon handles the client's mount requests. If the directory
/usr/src is available to the client (or to the public), the
mountd daemon does a NFS_GETFH system call on
/usr/src to get the fhandle, and it sends it to the
client's mount process.
-
mount does a
mount(S)
system call with the fhandle and /usr/src/dancer.src.
-
The client kernel looks up the directory /usr/src/dancer.src
and, if everything is in order, ties the file handle to the hierarchy
in a mount record.
-
The client kernel looks up the directory /usr/src on
dancer.
-
The client kernel does a
statvfs(S)
call to dancer's NFS server
nfsd.
-
The
mount(S)
system call from step 7 returns.
-
mount opens
/etc/mnttab and adds an appropriate entry to the end, reflecting
the new addition to the list of mounted files.
-
When the client kernel does a file operation, once the resource is mounted,
it sends the NFS RPC information to the server, where it is
read by one of the
nfsd daemons to process the file request.
-
The nfsd daemons know how a resource is shared from the
information sent to the server's kernel by share. These daemons
allow the client to access the resource according to its permissions.
Next topic:
Unmounting NFS resources with the umount command
Previous topic:
Examples: mounting resources
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005