1 '\" te
   2 .\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright 1989 AT&T
   4 .\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
   5 .\" 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.
   6 .\" 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.
   7 .\" 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]
   8 .TH VFSTAB 4 "Sep 8, 2015"
   9 .SH NAME
  10 vfstab \- table of file system defaults
  11 .SH DESCRIPTION
  12 .sp
  13 .LP
  14 The file \fB/etc/vfstab\fR describes defaults for each file system. The
  15 information is stored in a table with the following column headings:
  16 .sp
  17 .in +2
  18 .nf
  19 device       device       mount      FS      fsck    mount      mount
  20 to mount     to fsck      point      type    pass    at boot    options
  21 .fi
  22 .in -2
  23 .sp
  24 
  25 .sp
  26 .LP
  27 The fields in the table are space-separated and show the resource name
  28 (\fIdevice to mount\fR), the raw device to \fBfsck\fR (\fIdevice to fsck\fR),
  29 the default mount directory (\fImount point\fR), the name of the file system
  30 type (\fIFS type\fR), the number used by \fBfsck\fR to decide whether to check
  31 the file system automatically (\fIfsck pass\fR), whether the file system should
  32 be mounted automatically by \fBmountall\fR (\fImount at boot\fR), and the file
  33 system mount options (\fImount options\fR). (See respective mount file system
  34 man page below in \fBSEE ALSO\fR for \fImount options\fR.) A '-' is used to
  35 indicate no entry in a field. This may be used when a field does not apply to
  36 the resource being mounted.
  37 .sp
  38 .LP
  39 The \fBgetvfsent\fR(3C) family of routines is used to read and write to
  40 \fB/etc/vfstab\fR.
  41 .sp
  42 .LP
  43 \fB/etc/vfstab\fR can be used to specify swap areas. An entry so specified,
  44 (which can be a file or a device), will automatically be added as a swap area
  45 by the \fB/sbin/swapadd\fR script when the system boots. To specify a swap
  46 area, the \fIdevice-to-mount\fR field contains the name of the swap file or
  47 device, the \fIFS-type\fR is "swap", \fImount-at-boot\fR is "no" and all other
  48 fields have no entry.
  49 .SH EXAMPLES
  50 .sp
  51 .LP
  52 The following are \fBvfstab\fR entries for various file system types supported
  53 in the Solaris operating environment.
  54 .LP
  55 \fBExample 1 \fRNFS and UFS Mounts
  56 .sp
  57 .LP
  58 The following entry invokes NFS to automatically mount the directory
  59 \fB/usr/local\fR of the server \fBexample1\fR on the client's \fB/usr/local\fR
  60 directory with read-only permission:
  61 
  62 .sp
  63 .in +2
  64 .nf
  65 example1:/usr/local - /usr/local nfs - yes ro
  66 .fi
  67 .in -2
  68 .sp
  69 
  70 .sp
  71 .LP
  72 The following example assumes a small departmental mail setup, in which clients
  73 mount \fB/var/mail\fR from a server \fBmailsvr\fR. The following entry would be
  74 listed in each client's \fBvfstab\fR:
  75 
  76 .sp
  77 .in +2
  78 .nf
  79 mailsvr:/var/mail - /var/mail nfs - yes intr,bg
  80 .fi
  81 .in -2
  82 .sp
  83 
  84 .sp
  85 .LP
  86 The following is an example for a UFS file system in which logging is enabled:
  87 
  88 .sp
  89 .in +2
  90 .nf
  91 /dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging
  92 .fi
  93 .in -2
  94 .sp
  95 
  96 .sp
  97 .LP
  98 See \fBmount_nfs\fR(1M) for a description of NFS mount options and
  99 \fBmount_ufs\fR(1M) for a description of UFS options.
 100 
 101 .LP
 102 \fBExample 2 \fR\fBpcfs\fR Mounts
 103 .sp
 104 .LP
 105 The following example mounts a \fBpcfs\fR file system on a fixed hard disk on
 106 an x86 machine:
 107 
 108 .sp
 109 .in +2
 110 .nf
 111 /dev/dsk/c1t2d0p0:c - /win98 pcfs - yes -
 112 .fi
 113 .in -2
 114 .sp
 115 
 116 .sp
 117 .LP
 118 The example below mounts a Jaz drive on a SPARC machine. Normally, the volume
 119 management software handles mounting of removable media, obviating a
 120 \fBvfstab\fR entry. Specifying a device that supports removable media in
 121 \fBvfstab\fR  with set the mount-at-boot field to \fBno\fR (as shown below)
 122 disables the  automatic handling of that device. Such an entry presumes you are
 123 not running volume management software.
 124 
 125 .sp
 126 .in +2
 127 .nf
 128 /dev/dsk/c1t2d0s2:c - /jaz pcfs - no -
 129 .fi
 130 .in -2
 131 .sp
 132 
 133 .sp
 134 .LP
 135 For removable media on a SPARC machine, the convention for the slice portion of
 136 the disk identifier is to specify \fBs2\fR, which stands for the entire medium.
 137 
 138 .sp
 139 .LP
 140 For \fBpcfs\fR file systems on x86 machines, note that the disk identifier uses
 141 a \fBp\fR (\fBp0\fR) and a logical drive (\fBc\fR, in the \fB/win98\fR example
 142 above) for a \fBpcfs\fR logical drive. See \fBmount_pcfs\fR(1M) for syntax for
 143 \fBpcfs\fR logical drives and for \fBpcfs\fR-specific mount options.
 144 
 145 .LP
 146 \fBExample 3 \fRLoopback File System Mount
 147 .sp
 148 .LP
 149 The following is an example of mounting a loopback (\fBlofs\fR) file system:
 150 
 151 .sp
 152 .in +2
 153 .nf
 154 /export/test - /opt/test lofs - yes -
 155 .fi
 156 .in -2
 157 .sp
 158 
 159 .sp
 160 .LP
 161 See \fBlofs\fR(7FS) for an overview of the loopback file system.
 162 
 163 .SH SEE ALSO
 164 .sp
 165 .LP
 166 \fBfsck\fR(1M), \fBmount\fR(1M), \fBmount_hsfs\fR(1M),
 167 \fBmount_nfs\fR(1M), \fBmount_tmpfs\fR(1M), \fBmount_ufs\fR(1M),
 168 \fBswap\fR(1M), \fBgetvfsent\fR(3C)
 169 .sp
 170 .LP
 171 \fISystem Administration Guide: Basic Administration\fR