System Administration Guide: Resource Management and Network Services

How to Mount a File System at Boot Time

If you want to mount file systems at boot time instead of using autofs maps, follow this procedure. Although you must follow this procedure for all local file systems, do not use it for remote file systems because it must be completed on every client.

  1. Become superuser or assume an equivalent role.

    For information about roles, see “Using Privileged Applications” in System Administration Guide: Security Services.

  2. Add an entry for the file system to /etc/vfstab.

Entries in the /etc/vfstab file have the following syntax:

special  fsckdev  mountp  fstype  fsckpass  mount-at-boot  mntopts

See the vfstab(4) man page for more information.


Caution – Caution –

NFS servers should not have NFS vfstab entries because of a potential deadlock. The NFS service is started after the entries in /etc/vfstab are checked. As a result, if two servers that are mounting file systems from each other fail at the same time, each system could hang as the systems reboot.


Example-vfstab entry

You want a client computer to mount the /var/mail directory from the server wasp. You want the file system to be mounted as /var/mail on the client and you want the client to have read-write access. Add the following entry to the client's vfstab file.


wasp:/var/mail - /var/mail nfs - yes rw