Sunday, February 04, 2007

Perform a Network File System Mount

Often we are tasked to mount a directory or directories from a server to a client. Usually we do this using the automounter, which creates a virtual directory on the client. We like to use these soft mounts because the automounter unmounts the filesystem after 10 minutes (default) of non-access.

Here's an example of doing a simple automount:

On the server:

#vi /etc/dfs/dfstab
share "options go here" /export/exportdir
:wq! (saves and quits vi)

#share /export/exportdir

On the client workstation:

#vi /etc/auto_esofthub
/opt/mount_point "options go here" server:/export/exportdir
:wq! (saves and quits vi)

Add this entry into the /etc/auto_master.
#vi /etc/auto_master
/- "tab or space delimiter" /etc/auto_esofthub
:wq! (saves and quits vi)

#automount -v (mounts virtual directory or directories in verbose mode)

Note: These virtual mounts can be used to hide directories underneath them.

No comments: