xref: /illumos-gate/usr/src/man/man5/vfstab.5 (revision bbf21555)
18ac8a393SRobert Mustacchi'\"
2c10c16deSRichard Lowe.\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
3c10c16deSRichard Lowe.\" Copyright 1989 AT&T
4bd93c05dSAlexander Eremin.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
58ac8a393SRobert Mustacchi.\" Copyright 2022 Oxide Computer Company
68ac8a393SRobert Mustacchi.\"
78ac8a393SRobert Mustacchi.\" The contents of this file are subject to the terms of the
88ac8a393SRobert Mustacchi.\" Common Development and Distribution License (the "License").
98ac8a393SRobert Mustacchi.\" You may not use this file except in compliance with the License.
108ac8a393SRobert Mustacchi.\"
118ac8a393SRobert Mustacchi.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
128ac8a393SRobert Mustacchi.\" or http://www.opensolaris.org/os/licensing.
138ac8a393SRobert Mustacchi.\" See the License for the specific language governing permissions
148ac8a393SRobert Mustacchi.\" and limitations under the License.
158ac8a393SRobert Mustacchi.\"
168ac8a393SRobert Mustacchi.\" When distributing Covered Code, include this CDDL HEADER in each
178ac8a393SRobert Mustacchi.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
188ac8a393SRobert Mustacchi.\" If applicable, add the following below this CDDL HEADER, with the
198ac8a393SRobert Mustacchi.\" fields enclosed by brackets "[]" replaced with your own identifying
208ac8a393SRobert Mustacchi.\" information: Portions Copyright [yyyy] [name of copyright owner]
218ac8a393SRobert Mustacchi.\"
228ac8a393SRobert Mustacchi.Dd January 16, 2022
23*bbf21555SRichard Lowe.Dt VFSTAB 5
248ac8a393SRobert Mustacchi.Os
258ac8a393SRobert Mustacchi.Sh NAME
268ac8a393SRobert Mustacchi.Nm vfstab
278ac8a393SRobert Mustacchi.Nd table of file system defaults
288ac8a393SRobert Mustacchi.Sh DESCRIPTION
298ac8a393SRobert MustacchiThe file
308ac8a393SRobert Mustacchi.Pa /etc/vfstab
318ac8a393SRobert Mustacchidescribes defaults for each file system.
328ac8a393SRobert MustacchiThe information is stored in a table with the following column headings:
338ac8a393SRobert Mustacchi.Bd -literal
34c10c16deSRichard Lowedevice       device       mount      FS      fsck    mount      mount
35c10c16deSRichard Loweto mount     to fsck      point      type    pass    at boot    options
368ac8a393SRobert Mustacchi.Ed
378ac8a393SRobert Mustacchi.Pp
38c10c16deSRichard LoweThe fields in the table are space-separated and show the resource name
398ac8a393SRobert Mustacchi.Pq Fa device to mount ,
408ac8a393SRobert Mustacchithe raw device to
418ac8a393SRobert Mustacchi.Sy fsck
428ac8a393SRobert Mustacchi.Pq Em device to fsck ,
438ac8a393SRobert Mustacchithe default mount directory
448ac8a393SRobert Mustacchi.Pq Em mount point ,
458ac8a393SRobert Mustacchithe name of the file system type
468ac8a393SRobert Mustacchi.Pq Em FS type ,
478ac8a393SRobert Mustacchithe number used by
48*bbf21555SRichard Lowe.Xr fsck 8
498ac8a393SRobert Mustacchito decide whether to check the file system automatically
508ac8a393SRobert Mustacchi.Pq Em fsck pass ,
518ac8a393SRobert Mustacchiwhether the file system should be mounted automatically by
52*bbf21555SRichard Lowe.Xr mountall 8
538ac8a393SRobert Mustacchi.Pq Em mount at boot ,
548ac8a393SRobert Mustacchiand the file system mount options
558ac8a393SRobert Mustacchi.Pq Em mount options .
568ac8a393SRobert MustacchiSee respective mount file system man page below in
578ac8a393SRobert Mustacchi.Sx SEE ALSO
588ac8a393SRobert Mustacchifor
598ac8a393SRobert Mustacchi.Em mount options.
608ac8a393SRobert MustacchiA
618ac8a393SRobert Mustacchi.Sq -
628ac8a393SRobert Mustacchiis used to indicate no entry in a field.
638ac8a393SRobert MustacchiThis may be used when a field does not apply to the resource being mounted.
648ac8a393SRobert Mustacchi.Pp
658ac8a393SRobert MustacchiThe
668ac8a393SRobert Mustacchi.Xr getvfsent 3C
67c8f4a9f7SRobert Mustacchifamily of routines is used to read
68c8f4a9f7SRobert Mustacchi.Pa /etc/vfstab .
69c8f4a9f7SRobert MustacchiThere are currently no library routines to automate the writing of
708ac8a393SRobert Mustacchi.Pa /etc/vfstab .
718ac8a393SRobert Mustacchi.Pp
728ac8a393SRobert Mustacchi.Pa /etc/vfstab
738ac8a393SRobert Mustacchican be used to specify swap areas.
748ac8a393SRobert MustacchiAn entry so specified,
758ac8a393SRobert Mustacchi.Pq which can be a file or a device ,
768ac8a393SRobert Mustacchiwill automatically be added as a swap area by the
778ac8a393SRobert Mustacchi.Pa /sbin/swapadd
788ac8a393SRobert Mustacchiscript when the system boots.
798ac8a393SRobert MustacchiTo specify a swap area, the
808ac8a393SRobert Mustacchi.Em device-to-mount
818ac8a393SRobert Mustacchifield contains the name of the swap file or device, the
828ac8a393SRobert Mustacchi.Em FS-type
838ac8a393SRobert Mustacchiis
848ac8a393SRobert Mustacchi.Dq swap ,
858ac8a393SRobert Mustacchi.Em mount-at-boot
868ac8a393SRobert Mustacchiis
878ac8a393SRobert Mustacchi.Dq no
888ac8a393SRobert Mustacchiand all other fields have no entry.
898ac8a393SRobert Mustacchi.Sh EXAMPLES
908ac8a393SRobert MustacchiThe following are
918ac8a393SRobert Mustacchi.Pa /etc/vfstab
928ac8a393SRobert Mustacchientries for various file system types supported in illumos.
938ac8a393SRobert Mustacchi.Pp
948ac8a393SRobert Mustacchi.Sy Example 1
958ac8a393SRobert MustacchiNFS and UFS Mounts
968ac8a393SRobert Mustacchi.Pp
97c10c16deSRichard LoweThe following entry invokes NFS to automatically mount the directory
988ac8a393SRobert Mustacchi.Pa /usr/local
998ac8a393SRobert Mustacchiof the server
1008ac8a393SRobert Mustacchi.Sy example1
1018ac8a393SRobert Mustacchion the client's
1028ac8a393SRobert Mustacchi.Pa /usr/local
103c10c16deSRichard Lowedirectory with read-only permission:
1048ac8a393SRobert Mustacchi.Bd -literal -offset indent
105c10c16deSRichard Loweexample1:/usr/local - /usr/local nfs - yes ro
1068ac8a393SRobert Mustacchi.Ed
1078ac8a393SRobert Mustacchi.Pp
108c10c16deSRichard LoweThe following example assumes a small departmental mail setup, in which clients
1098ac8a393SRobert Mustacchimount
1108ac8a393SRobert Mustacchi.Pa /var/mail
1118ac8a393SRobert Mustacchifrom a server
1128ac8a393SRobert Mustacchi.Sy mailsvr .
1138ac8a393SRobert MustacchiThe following entry would be listed in each client's
1148ac8a393SRobert Mustacchi.Pa /etc/vfstab:
1158ac8a393SRobert Mustacchi.Bd -literal -offset indent
116c10c16deSRichard Lowemailsvr:/var/mail - /var/mail nfs - yes intr,bg
1178ac8a393SRobert Mustacchi.Ed
1188ac8a393SRobert Mustacchi.Pp
119c10c16deSRichard LoweThe following is an example for a UFS file system in which logging is enabled:
1208ac8a393SRobert Mustacchi.Bd -literal -offset indent
121c10c16deSRichard Lowe/dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging
1228ac8a393SRobert Mustacchi.Ed
1238ac8a393SRobert Mustacchi.Pp
1248ac8a393SRobert MustacchiSee
125*bbf21555SRichard Lowe.Xr mount_nfs 8
1268ac8a393SRobert Mustacchifor a description of NFS mount options and
127*bbf21555SRichard Lowe.Xr mount_ufs 8
1288ac8a393SRobert Mustacchifor a description of UFS options.
1298ac8a393SRobert Mustacchi.Pp
1308ac8a393SRobert Mustacchi.Sy Example 2
1318ac8a393SRobert Mustacchipcfs Mounts
1328ac8a393SRobert Mustacchi.Pp
1338ac8a393SRobert MustacchiThe following example mounts a pcfs file system on a fixed hard disk on an x86
1348ac8a393SRobert Mustacchimachine:
1358ac8a393SRobert Mustacchi.Bd -literal -offset indent
136c10c16deSRichard Lowe/dev/dsk/c1t2d0p0:c - /win98 pcfs - yes -
1378ac8a393SRobert Mustacchi.Ed
1388ac8a393SRobert Mustacchi.Pp
1398ac8a393SRobert MustacchiThe example below mounts a Jaz drive on a SPARC machine.
1408ac8a393SRobert MustacchiNormally, the volume management software handles mounting of removable media,
1418ac8a393SRobert Mustacchiobviating a
1428ac8a393SRobert Mustacchi.Nm
1438ac8a393SRobert Mustacchientry.
1448ac8a393SRobert MustacchiSpecifying a device that supports removable media in
1458ac8a393SRobert Mustacchi.Pa /etc/vfstab
1468ac8a393SRobert Mustacchiwith set the mount-at-boot field to
1478ac8a393SRobert Mustacchi.Dq no
1488ac8a393SRobert Mustacchi.Pq as shown below
1498ac8a393SRobert Mustacchidisables the automatic handling of that device.
1508ac8a393SRobert MustacchiSuch an entry presumes you are not running volume management software.
1518ac8a393SRobert Mustacchi.Bd -literal -offset indent
152c10c16deSRichard Lowe/dev/dsk/c1t2d0s2:c - /jaz pcfs - no -
1538ac8a393SRobert Mustacchi.Ed
1548ac8a393SRobert Mustacchi.Pp
155c10c16deSRichard LoweFor removable media on a SPARC machine, the convention for the slice portion of
1568ac8a393SRobert Mustacchithe disk identifier is to specify
1578ac8a393SRobert Mustacchi.Sy s2 ,
1588ac8a393SRobert Mustacchiwhich stands for the entire medium.
1598ac8a393SRobert Mustacchi.Pp
1608ac8a393SRobert MustacchiFor pcfs file systems on x86 machines, note that the disk identifier uses
1618ac8a393SRobert Mustacchia
1628ac8a393SRobert Mustacchi.Sy p
1638ac8a393SRobert Mustacchi.Pq Sy p0
1648ac8a393SRobert Mustacchiand a logical drive
1658ac8a393SRobert Mustacchi.Po
1668ac8a393SRobert Mustacchi.Sy c ,
1678ac8a393SRobert Mustacchiin the
1688ac8a393SRobert Mustacchi.Pa /win98
1698ac8a393SRobert Mustacchiexample above
1708ac8a393SRobert Mustacchi.Pc
1718ac8a393SRobert Mustacchifor a pcfs logical drive.
1728ac8a393SRobert MustacchiSee
173*bbf21555SRichard Lowe.Xr mount_pcfs 8
1748ac8a393SRobert Mustacchifor syntax for pcfs logical drives and for pcfs-specific mount options.
1758ac8a393SRobert Mustacchi.Pp
1768ac8a393SRobert Mustacchi.Sy Example 3
1778ac8a393SRobert Mustacchiloopback File System Mount
1788ac8a393SRobert Mustacchi.Pp
1798ac8a393SRobert MustacchiThe following is an example of mounting a loopback
1808ac8a393SRobert Mustacchi.Pq lofs
1818ac8a393SRobert Mustacchifile system:
1828ac8a393SRobert Mustacchi.Bd -literal
183c10c16deSRichard Lowe/export/test - /opt/test lofs - yes -
1848ac8a393SRobert Mustacchi.Ed
1858ac8a393SRobert MustacchiSee
186*bbf21555SRichard Lowe.Xr lofs 4FS
1878ac8a393SRobert Mustacchifor an overview of the loopback file system.
1888ac8a393SRobert Mustacchi.Sh SEE ALSO
189*bbf21555SRichard Lowe.Xr getvfsent 3C ,
190*bbf21555SRichard Lowe.Xr fsck 8 ,
191*bbf21555SRichard Lowe.Xr mount 8 ,
192*bbf21555SRichard Lowe.Xr mount_hsfs 8 ,
193*bbf21555SRichard Lowe.Xr mount_nfs 8 ,
194*bbf21555SRichard Lowe.Xr mount_tmpfs 8 ,
195*bbf21555SRichard Lowe.Xr mount_ufs 8 ,
196*bbf21555SRichard Lowe.Xr swap 8
197