'\" te
.\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH VFSTAB 4 "Sep 8, 2015"
.SH NAME
vfstab \- table of file system defaults
.SH DESCRIPTION
.LP
The file \fB/etc/vfstab\fR describes defaults for each file system. The
information is stored in a table with the following column headings:
.sp
.in +2
.nf
device       device       mount      FS      fsck    mount      mount
to mount     to fsck      point      type    pass    at boot    options
.fi
.in -2
.sp

.sp
.LP
The fields in the table are space-separated and show the resource name
(\fIdevice to mount\fR), the raw device to \fBfsck\fR (\fIdevice to fsck\fR),
the default mount directory (\fImount point\fR), the name of the file system
type (\fIFS type\fR), the number used by \fBfsck\fR to decide whether to check
the file system automatically (\fIfsck pass\fR), whether the file system should
be mounted automatically by \fBmountall\fR (\fImount at boot\fR), and the file
system mount options (\fImount options\fR). (See respective mount file system
man page below in \fBSEE ALSO\fR for \fImount options\fR.) A '-' is used to
indicate no entry in a field. This may be used when a field does not apply to
the resource being mounted.
.sp
.LP
The \fBgetvfsent\fR(3C) family of routines is used to read and write to
\fB/etc/vfstab\fR.
.sp
.LP
\fB/etc/vfstab\fR can be used to specify swap areas. An entry so specified,
(which can be a file or a device), will automatically be added as a swap area
by the \fB/sbin/swapadd\fR script when the system boots. To specify a swap
area, the \fIdevice-to-mount\fR field contains the name of the swap file or
device, the \fIFS-type\fR is "swap", \fImount-at-boot\fR is "no" and all other
fields have no entry.
.SH EXAMPLES
.LP
The following are \fBvfstab\fR entries for various file system types supported
in the Solaris operating environment.
.LP
\fBExample 1 \fRNFS and UFS Mounts
.sp
.LP
The following entry invokes NFS to automatically mount the directory
\fB/usr/local\fR of the server \fBexample1\fR on the client's \fB/usr/local\fR
directory with read-only permission:

.sp
.in +2
.nf
example1:/usr/local - /usr/local nfs - yes ro
.fi
.in -2
.sp

.sp
.LP
The following example assumes a small departmental mail setup, in which clients
mount \fB/var/mail\fR from a server \fBmailsvr\fR. The following entry would be
listed in each client's \fBvfstab\fR:

.sp
.in +2
.nf
mailsvr:/var/mail - /var/mail nfs - yes intr,bg
.fi
.in -2
.sp

.sp
.LP
The following is an example for a UFS file system in which logging is enabled:

.sp
.in +2
.nf
/dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging
.fi
.in -2
.sp

.sp
.LP
See \fBmount_nfs\fR(1M) for a description of NFS mount options and
\fBmount_ufs\fR(1M) for a description of UFS options.

.LP
\fBExample 2 \fR\fBpcfs\fR Mounts
.sp
.LP
The following example mounts a \fBpcfs\fR file system on a fixed hard disk on
an x86 machine:

.sp
.in +2
.nf
/dev/dsk/c1t2d0p0:c - /win98 pcfs - yes -
.fi
.in -2
.sp

.sp
.LP
The example below mounts a Jaz drive on a SPARC machine. Normally, the volume
management software handles mounting of removable media, obviating a
\fBvfstab\fR entry. Specifying a device that supports removable media in
\fBvfstab\fR  with set the mount-at-boot field to \fBno\fR (as shown below)
disables the  automatic handling of that device. Such an entry presumes you are
not running volume management software.

.sp
.in +2
.nf
/dev/dsk/c1t2d0s2:c - /jaz pcfs - no -
.fi
.in -2
.sp

.sp
.LP
For removable media on a SPARC machine, the convention for the slice portion of
the disk identifier is to specify \fBs2\fR, which stands for the entire medium.

.sp
.LP
For \fBpcfs\fR file systems on x86 machines, note that the disk identifier uses
a \fBp\fR (\fBp0\fR) and a logical drive (\fBc\fR, in the \fB/win98\fR example
above) for a \fBpcfs\fR logical drive. See \fBmount_pcfs\fR(1M) for syntax for
\fBpcfs\fR logical drives and for \fBpcfs\fR-specific mount options.

.LP
\fBExample 3 \fRLoopback File System Mount
.sp
.LP
The following is an example of mounting a loopback (\fBlofs\fR) file system:

.sp
.in +2
.nf
/export/test - /opt/test lofs - yes -
.fi
.in -2
.sp

.sp
.LP
See \fBlofs\fR(7FS) for an overview of the loopback file system.

.SH SEE ALSO
.LP
\fBfsck\fR(1M), \fBmount\fR(1M), \fBmount_hsfs\fR(1M),
\fBmount_nfs\fR(1M), \fBmount_tmpfs\fR(1M), \fBmount_ufs\fR(1M),
\fBswap\fR(1M), \fBgetvfsent\fR(3C)
.sp
.LP
\fISystem Administration Guide: Basic Administration\fR