'\" te .\" Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .TH vfstab 4 "8 Jun 2011" "SunOS 5.11" "File Formats" .SH NAME vfstab \- table of file system defaults .SH DESCRIPTION .sp .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 can 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), automatically is added as a swap area by the \fB/usr/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 \fBswap\fR, \fImount-at-boot\fR is \fBno\fR and all other fields have no entry. The presence in \fB/etc/vfstab\fR of the \fBencrypted\fR option, specified for swap device that is a ZFS volume or a raw device, enables encryption on that device. For a ZFS volume, encryption is enabled by the ZFS \fBencryption\fR property (see \fBzfs\fR(1M)); for a raw device, encryption is enabled by means of \fBlofi\fR(7D). .sp .LP iSCSI LUN can only be mounted after the iSCSI initiator SMF service, \fBsvc:/network/iscsi/initiator\fR, is started. Set the \fImount at boot\fR entries for iSCSI LUN in \fB/etc/vfstab\fR to \fBiscsi\fR instead of \fByes\fR. This enables the iSCSI initiator SMF service to attempt to mount iSCSI LUN later. .SH EXAMPLES .sp .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 .sp .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), \fBzfs\fR(1M), \fBgetvfsent\fR(3C), \fBlofi\fR(7D) .sp .LP \fIIntroduction to Oracle Solaris 11.3 Administration\fR