Previous Table of Contents Next

The Virtual File System Table (/etc/vfstab)

Each system has a virtual file system table, /etc /vfstab, that lists all the disk slices and file systems available to the system. The file system table also specifies the mount point and options for each file system. In the SunOS 4.x system software, the file system table is called /etc /fstab. The /etc /vfstab file replaces /etc /fstab and functions in a similar manner. The default file system configuration table (the /etc/vfstab file) depends on the selections made for each system when system software was installed. You should edit the /etc /vfstab file for each system to automatically mount local UFS file systems, essential NFS file systems, and any other appropriate file systems.

This section describes the contents of the /etc /vfstab file and provides information on how to edit and use the file. The file system table is an ASCII file. Comment lines begin with #. This example shows an /etc /vfstab file for a system with two disks and two NFS file systems mounted:

castle% more /etc/vfstab
#device         device        mount          FS    fsck   mount   mount
#to mount       to fsck       point          type  pass   at boot options
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr       ufs   1      yes     -
fd      -       /dev/fd fd      -     no     -
/proc   -       /proc   proc    -     no     -
/dev/dsk/c0t3d0s1       -       -     swap   -     no     -
/dev/dsk/c0t3d0s0       /dev/rdsk/c0t3d0s0   /     ufs    1       no
swap    -       /tmp    tmpfs   -     yes    -

Note that, for / and /usr, the automount field value is specified as no because these file systems are mounted as part of the boot sequence before the mountall command is run. If the automount field value is specified as yes, the mountall program redundantly (and unnecessarily) tries to mount these already mounted file systems.

The file system table has seven fields, each separated by a tab, as described in Table 4-2.

Table 4-2 Fields in the /etc/vfstab File

Field Description
device to mount The device to mount can be
· The block special device for local ufs file systems (for example, /dev/dsk/c0t0d0s0)
· The resource name for remote file systems (for example, myserver:/export/home for an NFS file system)
· The name of the slice on which to swap (for example, /dev/dsk/c0t3d0s1)
· The /proc directory and proc file system type
· CD-ROM as HSFS file system type
· /dev/diskette as PCFS or UFS file system type. This field is also used to specify swap file systems.
device to fsck The raw (character) special device that corresponds to the file system identified by the special field (for example, /dev/rdsk/c0t0d0s0). This determines the raw interface that is used by fsck. Use a hyphen (-) when there is no applicable device, such as for a read-only file system or a network-based file system.
mount point The default mount point directory (for example, /usr for /dev/dsk/c0t0d0s6).
FS type The type of file system identified by the special field.
fsck pass*The pass number used by fsck to decide whether to check a file system. When the field contains a hyphen (-), the file system is not checked. When the field contains a value of 1 or more, the file system is checked; non-ufs file systems with a zero fsck pass are checked. For ufs file systems only, when the field contains a zero (0), the file system is not checked. When fsck is run on multiple ufs file systems that have fsck pass values greater than 1 and the preen option (-o p) is used, fsck automatically checks the file systems on different disks in parallel to maximize efficiency. When the field contains a value of 1, the file system is checked sequentially. Otherwise, the value of the pass number does not have any effect.
mount at boot Indicate yes or no for whether the file system should be automatically mounted by mountall when the system is booted. Note that this field has nothing to do with the automounter software.
mount options A list of comma-separated options (with no spaces) that are used in mounting the file system. Use a hyphen (-) to show no options. See the mount_file-system-type(1M) manual page for a list of the available options.

*In SunOS 5.x system software, fsck pass does not explicitly specify the order in which file systems are checked as it did with SunOS 4.x system software.

NOTE:  You must have an entry in each field in the /etc/vfstab file. If there is no value for the field, be sure to enter a hyphen (-).

Previous Table of Contents Next