1*bbf21555SRichard Lowe'\" 2*bbf21555SRichard Lowe.\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved. 3*bbf21555SRichard Lowe.\" Copyright 1989 AT&T 4*bbf21555SRichard Lowe.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved. 5*bbf21555SRichard Lowe.\" Copyright 2022 Oxide Computer Company 6*bbf21555SRichard Lowe.\" 7*bbf21555SRichard Lowe.\" The contents of this file are subject to the terms of the 8*bbf21555SRichard Lowe.\" Common Development and Distribution License (the "License"). 9*bbf21555SRichard Lowe.\" You may not use this file except in compliance with the License. 10*bbf21555SRichard Lowe.\" 11*bbf21555SRichard Lowe.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 12*bbf21555SRichard Lowe.\" or http://www.opensolaris.org/os/licensing. 13*bbf21555SRichard Lowe.\" See the License for the specific language governing permissions 14*bbf21555SRichard Lowe.\" and limitations under the License. 15*bbf21555SRichard Lowe.\" 16*bbf21555SRichard Lowe.\" When distributing Covered Code, include this CDDL HEADER in each 17*bbf21555SRichard Lowe.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 18*bbf21555SRichard Lowe.\" If applicable, add the following below this CDDL HEADER, with the 19*bbf21555SRichard Lowe.\" fields enclosed by brackets "[]" replaced with your own identifying 20*bbf21555SRichard Lowe.\" information: Portions Copyright [yyyy] [name of copyright owner] 21*bbf21555SRichard Lowe.\" 22*bbf21555SRichard Lowe.Dd January 16, 2022 23*bbf21555SRichard Lowe.Dt VFSTAB 5 24*bbf21555SRichard Lowe.Os 25*bbf21555SRichard Lowe.Sh NAME 26*bbf21555SRichard Lowe.Nm vfstab 27*bbf21555SRichard Lowe.Nd table of file system defaults 28*bbf21555SRichard Lowe.Sh DESCRIPTION 29*bbf21555SRichard LoweThe file 30*bbf21555SRichard Lowe.Pa /etc/vfstab 31*bbf21555SRichard Lowedescribes defaults for each file system. 32*bbf21555SRichard LoweThe information is stored in a table with the following column headings: 33*bbf21555SRichard Lowe.Bd -literal 34*bbf21555SRichard Lowedevice device mount FS fsck mount mount 35*bbf21555SRichard Loweto mount to fsck point type pass at boot options 36*bbf21555SRichard Lowe.Ed 37*bbf21555SRichard Lowe.Pp 38*bbf21555SRichard LoweThe fields in the table are space-separated and show the resource name 39*bbf21555SRichard Lowe.Pq Fa device to mount , 40*bbf21555SRichard Lowethe raw device to 41*bbf21555SRichard Lowe.Sy fsck 42*bbf21555SRichard Lowe.Pq Em device to fsck , 43*bbf21555SRichard Lowethe default mount directory 44*bbf21555SRichard Lowe.Pq Em mount point , 45*bbf21555SRichard Lowethe name of the file system type 46*bbf21555SRichard Lowe.Pq Em FS type , 47*bbf21555SRichard Lowethe number used by 48*bbf21555SRichard Lowe.Xr fsck 8 49*bbf21555SRichard Loweto decide whether to check the file system automatically 50*bbf21555SRichard Lowe.Pq Em fsck pass , 51*bbf21555SRichard Lowewhether the file system should be mounted automatically by 52*bbf21555SRichard Lowe.Xr mountall 8 53*bbf21555SRichard Lowe.Pq Em mount at boot , 54*bbf21555SRichard Loweand the file system mount options 55*bbf21555SRichard Lowe.Pq Em mount options . 56*bbf21555SRichard LoweSee respective mount file system man page below in 57*bbf21555SRichard Lowe.Sx SEE ALSO 58*bbf21555SRichard Lowefor 59*bbf21555SRichard Lowe.Em mount options. 60*bbf21555SRichard LoweA 61*bbf21555SRichard Lowe.Sq - 62*bbf21555SRichard Loweis used to indicate no entry in a field. 63*bbf21555SRichard LoweThis may be used when a field does not apply to the resource being mounted. 64*bbf21555SRichard Lowe.Pp 65*bbf21555SRichard LoweThe 66*bbf21555SRichard Lowe.Xr getvfsent 3C 67*bbf21555SRichard Lowefamily of routines is used to read 68*bbf21555SRichard Lowe.Pa /etc/vfstab . 69*bbf21555SRichard LoweThere are currently no library routines to automate the writing of 70*bbf21555SRichard Lowe.Pa /etc/vfstab . 71*bbf21555SRichard Lowe.Pp 72*bbf21555SRichard Lowe.Pa /etc/vfstab 73*bbf21555SRichard Lowecan be used to specify swap areas. 74*bbf21555SRichard LoweAn entry so specified, 75*bbf21555SRichard Lowe.Pq which can be a file or a device , 76*bbf21555SRichard Lowewill automatically be added as a swap area by the 77*bbf21555SRichard Lowe.Pa /sbin/swapadd 78*bbf21555SRichard Lowescript when the system boots. 79*bbf21555SRichard LoweTo specify a swap area, the 80*bbf21555SRichard Lowe.Em device-to-mount 81*bbf21555SRichard Lowefield contains the name of the swap file or device, the 82*bbf21555SRichard Lowe.Em FS-type 83*bbf21555SRichard Loweis 84*bbf21555SRichard Lowe.Dq swap , 85*bbf21555SRichard Lowe.Em mount-at-boot 86*bbf21555SRichard Loweis 87*bbf21555SRichard Lowe.Dq no 88*bbf21555SRichard Loweand all other fields have no entry. 89*bbf21555SRichard Lowe.Sh EXAMPLES 90*bbf21555SRichard LoweThe following are 91*bbf21555SRichard Lowe.Pa /etc/vfstab 92*bbf21555SRichard Loweentries for various file system types supported in illumos. 93*bbf21555SRichard Lowe.Pp 94*bbf21555SRichard Lowe.Sy Example 1 95*bbf21555SRichard LoweNFS and UFS Mounts 96*bbf21555SRichard Lowe.Pp 97*bbf21555SRichard LoweThe following entry invokes NFS to automatically mount the directory 98*bbf21555SRichard Lowe.Pa /usr/local 99*bbf21555SRichard Loweof the server 100*bbf21555SRichard Lowe.Sy example1 101*bbf21555SRichard Loweon the client's 102*bbf21555SRichard Lowe.Pa /usr/local 103*bbf21555SRichard Lowedirectory with read-only permission: 104*bbf21555SRichard Lowe.Bd -literal -offset indent 105*bbf21555SRichard Loweexample1:/usr/local - /usr/local nfs - yes ro 106*bbf21555SRichard Lowe.Ed 107*bbf21555SRichard Lowe.Pp 108*bbf21555SRichard LoweThe following example assumes a small departmental mail setup, in which clients 109*bbf21555SRichard Lowemount 110*bbf21555SRichard Lowe.Pa /var/mail 111*bbf21555SRichard Lowefrom a server 112*bbf21555SRichard Lowe.Sy mailsvr . 113*bbf21555SRichard LoweThe following entry would be listed in each client's 114*bbf21555SRichard Lowe.Pa /etc/vfstab: 115*bbf21555SRichard Lowe.Bd -literal -offset indent 116*bbf21555SRichard Lowemailsvr:/var/mail - /var/mail nfs - yes intr,bg 117*bbf21555SRichard Lowe.Ed 118*bbf21555SRichard Lowe.Pp 119*bbf21555SRichard LoweThe following is an example for a UFS file system in which logging is enabled: 120*bbf21555SRichard Lowe.Bd -literal -offset indent 121*bbf21555SRichard Lowe/dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging 122*bbf21555SRichard Lowe.Ed 123*bbf21555SRichard Lowe.Pp 124*bbf21555SRichard LoweSee 125*bbf21555SRichard Lowe.Xr mount_nfs 8 126*bbf21555SRichard Lowefor a description of NFS mount options and 127*bbf21555SRichard Lowe.Xr mount_ufs 8 128*bbf21555SRichard Lowefor a description of UFS options. 129*bbf21555SRichard Lowe.Pp 130*bbf21555SRichard Lowe.Sy Example 2 131*bbf21555SRichard Lowepcfs Mounts 132*bbf21555SRichard Lowe.Pp 133*bbf21555SRichard LoweThe following example mounts a pcfs file system on a fixed hard disk on an x86 134*bbf21555SRichard Lowemachine: 135*bbf21555SRichard Lowe.Bd -literal -offset indent 136*bbf21555SRichard Lowe/dev/dsk/c1t2d0p0:c - /win98 pcfs - yes - 137*bbf21555SRichard Lowe.Ed 138*bbf21555SRichard Lowe.Pp 139*bbf21555SRichard LoweThe example below mounts a Jaz drive on a SPARC machine. 140*bbf21555SRichard LoweNormally, the volume management software handles mounting of removable media, 141*bbf21555SRichard Loweobviating a 142*bbf21555SRichard Lowe.Nm 143*bbf21555SRichard Loweentry. 144*bbf21555SRichard LoweSpecifying a device that supports removable media in 145*bbf21555SRichard Lowe.Pa /etc/vfstab 146*bbf21555SRichard Lowewith set the mount-at-boot field to 147*bbf21555SRichard Lowe.Dq no 148*bbf21555SRichard Lowe.Pq as shown below 149*bbf21555SRichard Lowedisables the automatic handling of that device. 150*bbf21555SRichard LoweSuch an entry presumes you are not running volume management software. 151*bbf21555SRichard Lowe.Bd -literal -offset indent 152*bbf21555SRichard Lowe/dev/dsk/c1t2d0s2:c - /jaz pcfs - no - 153*bbf21555SRichard Lowe.Ed 154*bbf21555SRichard Lowe.Pp 155*bbf21555SRichard LoweFor removable media on a SPARC machine, the convention for the slice portion of 156*bbf21555SRichard Lowethe disk identifier is to specify 157*bbf21555SRichard Lowe.Sy s2 , 158*bbf21555SRichard Lowewhich stands for the entire medium. 159*bbf21555SRichard Lowe.Pp 160*bbf21555SRichard LoweFor pcfs file systems on x86 machines, note that the disk identifier uses 161*bbf21555SRichard Lowea 162*bbf21555SRichard Lowe.Sy p 163*bbf21555SRichard Lowe.Pq Sy p0 164*bbf21555SRichard Loweand a logical drive 165*bbf21555SRichard Lowe.Po 166*bbf21555SRichard Lowe.Sy c , 167*bbf21555SRichard Lowein the 168*bbf21555SRichard Lowe.Pa /win98 169*bbf21555SRichard Loweexample above 170*bbf21555SRichard Lowe.Pc 171*bbf21555SRichard Lowefor a pcfs logical drive. 172*bbf21555SRichard LoweSee 173*bbf21555SRichard Lowe.Xr mount_pcfs 8 174*bbf21555SRichard Lowefor syntax for pcfs logical drives and for pcfs-specific mount options. 175*bbf21555SRichard Lowe.Pp 176*bbf21555SRichard Lowe.Sy Example 3 177*bbf21555SRichard Loweloopback File System Mount 178*bbf21555SRichard Lowe.Pp 179*bbf21555SRichard LoweThe following is an example of mounting a loopback 180*bbf21555SRichard Lowe.Pq lofs 181*bbf21555SRichard Lowefile system: 182*bbf21555SRichard Lowe.Bd -literal 183*bbf21555SRichard Lowe/export/test - /opt/test lofs - yes - 184*bbf21555SRichard Lowe.Ed 185*bbf21555SRichard LoweSee 186*bbf21555SRichard Lowe.Xr lofs 4FS 187*bbf21555SRichard Lowefor an overview of the loopback file system. 188*bbf21555SRichard Lowe.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