NFS Exercise


Notes: Where ever you see <server> input the name of the machine that is your server. Follow directions carefully.

 On the NFS Server

    Edit the /etc/dfs/dfstab file. Add an entry to share the directory that holds the manual pages.
     

        share   /usr/share/man
     

    Start the NFS server daemons.
     

        # /etc/init.d/nfs.server   start
     

    Use the following commands to verify that /usr/share/man is shared, and that no NFS mounts are present:
     

        # share

        # dfshares

        # dfmounts
     

On the NFS Client

    Rename the /usr/share/man directory so that you can no longer access the manual pages installed on the client system. Verify that the man pages are unavailable.

        # cd   /usr/share

        # mv   man   man.orig

        # man   ls

    What message does the man command report?
     

    Create a new man directory for use as a mount point.
     

        # mkdir   man
     

    Mount /usr/share/man from the server.
     

        # mount   <server>:/usr/share/man   /usr/share/man
     

    Verify that the man pages are now available.
     
     

        # man   ls
     
     

    Did it work?
     
     

    Verify and record the default options used for this mount.
     

        # mount
     

    Verify the list of mounts that the server is providing.
     

        # dfmounts   <server>
     

    Unmount /usr/share/man, and again verify the list of remote mounts provided by the server.
     

        # umount   /usr/share/man

        # dfmounts   <server>
     

On the NFS Server

    Unshare the /usr/share/man directory.
     

        # unshareall
     

    Change the share statement in /etc/dfs/dfstab for /usr/share/man so it reads:
     

        share   -o   rw=sunlab2-1   /usr/share/man
     

    Share the /usr/share/man directory.
     

        # shareall
     

On the NFS Client

    Attempt to mount /usr/share/man again.
     
     

        # mount   <server>:/usr/share/man   /usr/share/man
     
     

    What happens? Why does it happen? Check the man pages on the share command.
     
     
     

On the NFS Server

    Unshare the /usr/share/man directory.
     
     

        # unshareall
     

    Edit /etc/dfs/dfstab to remove the entry for the /usr/share/man directory.
     
     
     

On the NFS Client

    Return /usr/share/man to its original configuration. Verify that the man pages are available again.
     

        # cd   /usr/share

    # rmdir   man
    # mv   man.orig   man
    # man   ls

 
 
 

Marty Froomin 4/12/04