Field Descriptions for the /etc/vfstab File

Solaris provides a way to keep mount settings and mount a slice automatically when the system starts. The file /etc/vfstab contains automatic mounting options. If this file becomes damaged or the proper syntax is not followed in it, the server could become severely damaged and not start properly.

Caution: Never work with the /etc/vfstab file without creating a backup copy of the file. This file is absolutely critical to the operation of a server!

(1) Device to Mount (2) Device to fsck (3) Mount Point (4) FS Type (5) fsck Pass (6) Mount at Boot (7) Mount Options
Figure 1 Fields in an /etc/vfstab file

An entry in the /etc/vfstab file has seven fields, which are described in the following table.

# Field NameDescription
1 device to mount This field identifies one of the following:
  • The block device name for a local legacy UFS file system (for example, /dev/dsk/ c8t1d0s7).
  • The resource name for a remote file system (for example, myserver:/export/home).
  • The swap volume (for example, /dev/zvol/dsk/rpool/swap).
  • A directory for a virtual file system.
2 device to fsck The raw (character) device name that corresponds to the legacy UFS file system identified by the device to mount field (for example, /dev/rdsk/c8t1d0s7). This field determines the raw interface that is used by the fsck command. Use a dash (-) when there is no applicable device, such as for a read-only file system or a remote file system.
3 mount point Identifies where to mount the legacy or remote file system (for example, /data).
4 FS type Identifies the type of file system.
5 fsck pass The pass number used by the fsck command to decide whether to check a legacy UFS file system. When the field contains a dash (-), the file system is not checked. Currently, the fsck pass value in the /etc/vfstab file is ignored during the boot process. When the field contains a zero, legacy UFS file systems are not checked. When the field contains a value greater than zero, the UFS file system is always checked. All legacy UFS file systems with a value of 1 in this field are checked one at a time in the order they appear in the vfstab file. When the fsck command is run on multiple UFS file systems that have fsck pass values greater than 1 and the preen option (-o p) is used, the fsck command automatically checks the file systems on different disks in parallel to maximize efficiency. Otherwise, the value of the pass number does not have any effect.
6 mount at boot Set to yes or no for whether the file system should be automatically mounted by the mountall command when the system is booted. Note that this field has nothing to do with autofs. This field should always be set to no for virtual file systems such as /proc and /dev/fd.
7 mount options A list of comma-separated options (with no spaces) that are used for mounting the file system. Use a dash (-) to indicate no options. For more information, see vfstab(4).

Note: You must have an entry in each field in the /etc/vfstab file. If there is no value for a field, be sure to specify a dash (-). Otherwise, the system might not boot successfully. Similarly, white space should not be used as a field value.