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
40 .Nd static information about the file systems
46 contains descriptive information about the various file
49 is only read by programs, and not written;
50 it is the duty of the system administrator to properly create
51 and maintain this file.
52 Each file system is described on a separate line;
53 fields on each line are separated by tabs or spaces.
54 The order of records in
61 sequentially iterate through
67 describes the special device or
68 remote file system to be mounted.
72 describes the mount point for the file system.
73 For swap partitions, this field should be specified as
78 describes the type of the file system.
79 The system can support various file system types.
80 Only the root, /usr, and /tmp file systems need be statically
81 compiled into the kernel;
82 everything else will be automatically loaded at mount
84 (Exception: the FFS cannot currently be demand-loaded.)
85 Some people still prefer to statically
86 compile other file systems as well.
90 describes the mount options associated with the file system.
91 It is formatted as a comma separated list of options.
92 It contains at least the type of mount (see
94 below) plus any additional options appropriate to the file system type.
99 page and the file system specific page, such as
101 for additional options that may be specified.
102 All options that can be given to the file system specific mount commands
106 They just need to be formatted a bit differently.
109 option can be used without the preceding
112 Other options need both the file system specific flag and its argument,
113 separated by an equal sign.
114 For example, mounting an
116 filesystem, the options
117 .Bd -literal -offset indent
118 -o sync -o noatime -m 644 -M 755 -u foo -g bar
122 .Bd -literal -offset indent
123 sync,noatime,-m=644,-M=755,-u=foo,-g=bar
126 in the option field of
134 the file system is automatically processed by the
136 command, and user and/or group disk quotas are enabled with
139 file system quotas are maintained in files named
143 which are located at the root of the associated file system.
144 These defaults may be overridden by putting an equal sign
145 and an alternative absolute pathname following the quota option.
146 Thus, if the user quota file for
149 .Pa /var/quotas/tmp.user ,
150 this location can be specified as:
151 .Bd -literal -offset indent
152 userquota=/var/quotas/tmp.user
158 the system will ignore any error which happens during the mount of that filesystem,
159 which would otherwise cause the system to drop into single user mode.
160 This option is implemented by the
162 command and will not be passed to the kernel.
166 is specified, the file system will not be automatically
167 mounted at system startup.
168 Note that, for network file systems
170 (i.e., types supported by additional software
171 not included in the base system)
172 to be automatically mounted at system startup,
174 .Va extra_netfs_types
176 variable must be used to extend the
178 startup script's list of network file system types.
180 The type of the mount is extracted from the
182 field and stored separately in the
184 field (it is not deleted from the
193 then the file system whose name is given in the
195 field is normally mounted read-write or read-only on the
196 specified special file.
201 then the special file is made available as a piece of swap
204 command at the end of the system reboot procedure.
205 The fields other than
214 the entry is ignored.
215 This is useful to show disk partitions which are currently unused.
219 is used for these file systems by the
221 command to determine which file systems need to be dumped.
222 If the fifth field is not present, a value of zero is returned and
224 will assume that the file system does not need to be dumped.
225 If the fifth field is greater than 0, then it specifies the number of days
226 between dumps for this file system.
234 programs to determine the order in which file system and quota
235 checks are done at reboot time.
238 field can be any value between 0 and
241 The root file system should be specified with a
243 of 1, and other file systems should have a
248 value of 1 is always checked sequentially and be completed before
249 another file system is processed, and it will be processed before
250 all file systems with a larger
253 For any given value of
255 file systems within a drive will be checked sequentially,
256 but file systems on different drives will be checked at the
257 same time to utilize parallelism available in the hardware.
258 Once all file system checks are complete for the current
260 the same process will start over for the next
263 If the sixth field is not present or is zero,
264 a value of zero is returned and
268 will assume that the file system does not need to be checked.
272 field can be used to implement finer control when
273 the system utilities may determine that the file system resides
274 on a different physical device, when it actually does not, as with a
277 All file systems with a lower
279 value will be completed before starting on file systems with a
283 E.g. all file systems with a
285 of 2 will be completed before any file systems with a
287 of 3 or greater are started.
288 Gaps are allowed between the different
291 E.g. file systems listed in
295 values such as 0, 1, 2, 15, 100, 200, 300, and may appear in any order
299 #define FSTAB_RW "rw" /* read/write device */
300 #define FSTAB_RQ "rq" /* read/write with quotas */
301 #define FSTAB_RO "ro" /* read-only device */
302 #define FSTAB_SW "sw" /* swap device */
303 #define FSTAB_XX "xx" /* ignore totally */
306 char *fs_spec; /* block special device name */
307 char *fs_file; /* file system path prefix */
308 char *fs_vfstype; /* File system type, ufs, nfs */
309 char *fs_mntops; /* Mount options ala -o */
310 char *fs_type; /* FSTAB_* from fs_mntops */
311 int fs_freq; /* dump frequency, in days */
312 int fs_passno; /* pass number on parallel fsck */
316 The proper way to read records from
318 is to use the routines
325 .Bl -tag -width /etc/fstab -compact
346 file format appeared in