1 .\" $NetBSD: fstab.5,v 1.35 2009/01/11 20:51:18 pooka Exp $
3 .\" Copyright (c) 1980, 1989, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93
37 .Nd filesystem table for devices, types, and mount points
43 contains descriptive information about the various file systems.
45 is only read by programs, and not written;
46 it is the duty of the system administrator to properly create
47 and maintain this file.
48 Each filesystem is described on a separate line;
49 fields on each line are separated by tabs or spaces.
54 The order of records in
61 sequentially iterate through
63 doing their respective tasks.
65 Each configuration line/record in
68 .Dl fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno
72 describes the block special device or
73 remote filesystem to be mounted.
74 For filesystems of type
76 the special file name is the block special file name,
77 and not the character special file name.
78 If a program needs the character special file name,
79 the program must create it by appending a
84 in the special file name.
88 describes the mount point for the filesystem.
89 For swap and dump partitions, this field should be specified as
94 describes the type of the filesystem.
95 The system currently supports these filesystems:
96 .Bl -tag -width filecore -offset indent
104 9660 CD-ROM filesystem.
106 an implementation of the Linux
107 .Dq Second Extended File-system .
119 various and sundry kernel statistics.
121 a log-structured file-system.
131 a Sun Microsystems compatible
132 .Dq Network File System .
138 a loop-back filesystem, allowing parts of the system to be viewed
141 a demonstration of layered filesystems.
143 a general filesystem interface, currently supports TCP and FS mounts.
145 a local filesystem of process information.
147 a pseudo-terminal device file system.
149 a shared resource from an SMB/CIFS file server.
151 a disk partition to be used for swapping and paging.
153 an efficient memory file system.
155 a user and group re-mapping filesystem.
157 a translucent filesystem.
162 describes the mount options associated with the filesystem.
163 It is formatted as a comma separated list of options.
164 It contains at least the type of mount (see
166 below) plus any additional options
167 appropriate to the filesystem type.
174 a file system not to be mounted automatically (with
177 or system boot time).
184 the filesystem is automatically processed by the
186 command, and user and/or group disk quotas are enabled with
189 filesystem quotas are maintained in files named
193 which are located at the root of the associated filesystem.
194 These defaults may be overridden by putting an equal sign
195 and an alternative absolute pathname following the quota option.
196 Thus, if the user quota file for
199 .Pa /var/quotas/tmp.user ,
200 this location can be specified as:
201 .Bd -literal -offset indent
202 userquota=/var/quotas/tmp.user
207 is used to mount the file system using a
209 userspace server instead of the kernel server.
211 The type of the mount is extracted from the
213 field and stored separately in the
215 field (it is not deleted from the
224 then the filesystem whose name is given in the
226 field is normally mounted read-write or read-only on the
227 specified special file.
234 then the special file is made available as a piece of swap
238 command towards the beginning of the system reboot procedure.
241 for more information on configuring swap and dump devices.
242 The fields other than
251 the entry is ignored.
252 This is useful to show disk partitions which are currently unused.
256 is used for these filesystems by the
258 command to determine which filesystems need to be dumped.
259 If the fifth field is not present, a value of zero is returned and
261 will assume that the filesystem does not need to be dumped.
267 program to determine the order in which filesystem checks are done
269 The root filesystem should be specified with a
271 of 1, and other filesystems should have a
274 Filesystems within a drive will be checked sequentially,
275 but filesystems on different drives will be checked at the
276 same time to use parallelism available in the hardware.
277 If the sixth field is not present or zero,
278 a value of zero is returned and
280 will assume that the filesystem does not need to be checked.
282 #define FSTAB_RW "rw" /* read-write device */
283 #define FSTAB_RQ "rq" /* read/write with quotas */
284 #define FSTAB_RO "ro" /* read-only device */
285 #define FSTAB_SW "sw" /* swap device */
286 #define FSTAB_DP "dp" /* dump device */
287 #define FSTAB_XX "xx" /* ignore totally */
290 char *fs_spec; /* block special device name */
291 char *fs_file; /* filesystem path prefix */
292 char *fs_vfstype; /* type of filesystem */
293 char *fs_mntops; /* comma separated mount options */
294 char *fs_type; /* rw, ro, sw, or xx */
295 int fs_freq; /* dump frequency, in days */
296 int fs_passno; /* pass number on parallel fsck */
300 The proper way to read records from
302 is to use the routines
308 .Bl -tag -width /etc/fstab
313 .It Pa /usr/share/examples/fstab/
314 Some useful configuration examples.
323 file format appeared in