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.5 2008/07/27 21:16:00 thomas Exp $
36 .Dd September 13, 2009
41 .Nd static information about the file systems
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 file system 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 special file or
69 remote file system to be mounted.
81 labels maybe augmented with a
88 based paths can mount serial numbers similar to
90 labels by using the path
91 .Pa /dev/serno/SERIALNO[.suffix] .
95 describes the mount point for the file system.
96 For swap partitions, this field should be specified as
101 describes the type of the file system.
102 The system can support various file system types.
107 file systems need be statically
108 compiled into the kernel;
109 everything else will be automatically loaded at mount
111 (Exception: the UFS family - FFS, MFS, and LFS cannot
112 currently be demand-loaded.) Some people still prefer to statically
113 compile other file systems as well.
115 The most common file system types are:
116 .Bl -tag -width indent -offset indent
131 a Sun Microsystems compatible
132 .Dq "Network File System"
134 a disk partition to be used for swapping
138 DOS compatible file system
140 a local CD-ROM file system (as per ISO 9660)
141 .\" maybe also say Rock Ridge extensions are handled ?
143 a file system for accessing process data
148 describes the mount options associated with the file system.
149 It is formatted as a comma separated list of options.
150 It contains at least the type of mount (see
152 below) plus any additional options
153 appropriate to the file system type.
158 page and the file system specific page, such as
160 for additional options that may be specified.
162 If the options ``userquota'' and/or ``groupquota'' are specified,
163 the file system is automatically processed by the
165 command, and user and/or group disk quotas are enabled with
168 file system quotas are maintained in files named
172 which are located at the root of the associated file system.
173 These defaults may be overridden by putting an equal sign
174 and an alternative absolute pathname following the quota option.
175 Thus, if the user quota file for
178 .Pa /var/quotas/tmp.user ,
179 this location can be specified as:
180 .Bd -literal -offset indent
181 userquota=/var/quotas/tmp.user
184 If the option ``noauto'' is specified, the file system will not be automatically
185 mounted at system startup.
186 This is recommended for all remote file systems other than NFS,
187 since only NFS mounts are delayed until after network initialization
192 The type of the mount is extracted from the
194 field and stored separately in the
196 field (it is not deleted from the
201 is ``rw'' or ``ro'' then the file system whose name is given in the
203 field is normally mounted read-write or read-only on the
204 specified special file.
207 is ``sw'' then the special file is made available as a piece of swap
210 command at the end of the system reboot procedure.
211 The fields other than
218 is specified as ``xx'' the entry is ignored.
219 This is useful to show disk partitions which are currently unused.
223 is used for these file systems by the
225 command to determine which file systems need to be dumped.
226 If the fifth field is not present, a value of zero is returned and
228 will assume that the file system does not need to be dumped.
234 program to determine the order in which file system checks are done
236 The root file system should be specified with a
238 of 1, and other file systems should have a
241 File systems within a drive will be checked sequentially,
242 but file systems on different drives will be checked at the
243 same time to utilize parallelism available in the hardware.
244 If the sixth field is not present or is zero,
245 a value of zero is returned and
247 will assume that the file system does not need to be checked.
249 #define FSTAB_RW "rw" /* read/write device */
250 #define FSTAB_RQ "rq" /* read/write with quotas */
251 #define FSTAB_RO "ro" /* read-only device */
252 #define FSTAB_SW "sw" /* swap device */
253 #define FSTAB_XX "xx" /* ignore totally */
256 char *fs_spec; /* block special device name */
257 char *fs_file; /* file system path prefix */
258 char *fs_vfstype; /* File system type, ufs, nfs */
259 char *fs_mntops; /* Mount options ala -o */
260 char *fs_type; /* FSTAB_* from fs_mntops */
261 int fs_freq; /* dump frequency, in days */
262 int fs_passno; /* pass number on parallel fsck */
266 The proper way to read records from
268 is to use the routines
275 .Bl -tag -width /etc/fstab -compact
296 file format appeared in