1 .\" Copyright (c) 1980, 1989, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93
33 .\" $FreeBSD: src/share/man/man5/fstab.5,v 1.11.2.8 2003/02/10 12:21:08 des Exp $
34 .\" $DragonFly: src/share/man/man5/fstab.5,v 1.4 2007/07/30 22:11:33 swildner Exp $
41 .Nd static information about the filesystems
47 contains descriptive information about the various file
50 is only read by programs, and not written;
51 it is the duty of the system administrator to properly create
52 and maintain this file.
53 Each filesystem is described on a separate line;
54 fields on each line are separated by tabs or spaces.
55 The order of records in
62 sequentially iterate through
68 describes the block special device or
69 remote filesystem to be mounted.
70 For filesystems of type
72 the special file name is the block special file name,
73 and not the character special file name.
74 If a program needs the character special file name,
75 the program must create it by appending a ``r'' after the
76 last ``/'' in the special file name.
80 describes the mount point for the filesystem.
81 For swap partitions, this field should be specified as ``none''.
85 describes the type of the filesystem.
86 The system can support various filesystem types.
87 Only the root, /usr, and /tmp filesystems need be statically
88 compiled into the kernel;
89 everything else will be automatically loaded at mount
90 time. (Exception: the UFS family - FFS, MFS, and LFS cannot
91 currently be demand-loaded.) Some people still prefer to statically
92 compile other filesystems as well.
93 .Bl -tag -width indent -offset indent
103 a Sun Microsystems compatible ``Network File System''
105 a disk partition to be used for swapping
107 a DOS compatible filesystem
109 a CD-ROM filesystem (as per ISO 9660)
110 .\" maybe also say Rock Ridge extensions are handled ?
112 a file system for accessing process data
117 describes the mount options associated with the filesystem.
118 It is formatted as a comma separated list of options.
119 It contains at least the type of mount (see
121 below) plus any additional options
122 appropriate to the filesystem type. See the options flag
126 page and the filesystem specific page, such as
128 for additional options that may be specified.
130 If the options ``userquota'' and/or ``groupquota'' are specified,
131 the filesystem is automatically processed by the
133 command, and user and/or group disk quotas are enabled with
136 filesystem quotas are maintained in files named
140 which are located at the root of the associated filesystem.
141 These defaults may be overridden by putting an equal sign
142 and an alternative absolute pathname following the quota option.
143 Thus, if the user quota file for
146 .Pa /var/quotas/tmp.user ,
147 this location can be specified as:
148 .Bd -literal -offset indent
149 userquota=/var/quotas/tmp.user
152 If the option ``noauto'' is specified, the filesystem will not be automatically
153 mounted at system startup.
154 This is recommended for all remote filesystems other than NFS,
155 since only NFS mounts are delayed until after network initialization
160 The type of the mount is extracted from the
162 field and stored separately in the
164 field (it is not deleted from the
169 is ``rw'' or ``ro'' then the filesystem whose name is given in the
171 field is normally mounted read-write or read-only on the
172 specified special file.
175 is ``sw'' then the special file is made available as a piece of swap
178 command at the end of the system reboot procedure.
179 The fields other than
186 is specified as ``xx'' the entry is ignored.
187 This is useful to show disk partitions which are currently unused.
191 is used for these filesystems by the
193 command to determine which filesystems need to be dumped.
194 If the fifth field is not present, a value of zero is returned and
196 will assume that the filesystem does not need to be dumped.
202 program to determine the order in which filesystem checks are done
204 The root filesystem should be specified with a
206 of 1, and other filesystems should have a
209 Filesystems within a drive will be checked sequentially,
210 but filesystems on different drives will be checked at the
211 same time to utilize parallelism available in the hardware.
212 If the sixth field is not present or is zero,
213 a value of zero is returned and
215 will assume that the filesystem does not need to be checked.
217 #define FSTAB_RW "rw" /* read/write device */
218 #define FSTAB_RQ "rq" /* read/write with quotas */
219 #define FSTAB_RO "ro" /* read-only device */
220 #define FSTAB_SW "sw" /* swap device */
221 #define FSTAB_XX "xx" /* ignore totally */
224 char *fs_spec; /* block special device name */
225 char *fs_file; /* filesystem path prefix */
226 char *fs_vfstype; /* File system type, ufs, nfs */
227 char *fs_mntops; /* Mount options ala -o */
228 char *fs_type; /* FSTAB_* from fs_mntops */
229 int fs_freq; /* dump frequency, in days */
230 int fs_passno; /* pass number on parallel fsck */
234 The proper way to read records from
236 is to use the routines
243 .Bl -tag -width /etc/fstab -compact
263 file format appeared in