DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using DFS commands and files

Mounting a remote resource automatically

To mount a remote resource automatically, use the /etc/vfstab file, which allows you to mount a local file system automatically when you boot the system. If you edit the file to include a remote file system or directory, the remote resource is mounted automatically when you take the system to init state 3.

  1. Create a mount point for the resource using the mkdir command.

  2. Edit the vfstab file. Entries in the vfstab file require the following syntax:

    special fsckdev mountp fstype fsckpass automnt mntopts

    See the vfstab(4) manual page for a description of the fields in the /etc/vfstab file.

  3. Once you create the mount point and edit the /etc/vfstab file, the file system or directory will be mounted automatically when you enter init state 3. It will be mounted automatically every time you enter init state 3 until you modify the vfstab file (unless, of course, the server sharing the directory unshares it). The contents of /etc/vfstab remain the same until you edit the file.
For an illustration of how to mount a resource automatically, see ``Example: mounting a resource automatically''.

Example: mounting a resource automatically

Assume you want to mount the resource /usr/share from a server named ``frontoffice.'' You want the resource to be mounted automatically every time you take your system to init state 3. The directory is an NFS resource. You want to mount the directory on the mount point /usr/local/tmp with read-only access. First create the mount point by typing the following:

mkdir /usr/local/tmp

Make sure the mode and permissions of the new mount point match those of the resource you want to mount on it. Then edit the /etc/vfstab file, using any supported text editor. The file entry should look like this:

   frontoffice:/usr/share - /usr/local/tmp nfs - yes ro

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004