]> git.ipfire.org Git - thirdparty/util-linux.git/blob - mount/fstab.5
Imported from util-linux-2.5 tarball.
[thirdparty/util-linux.git] / mount / fstab.5
1 .\" Copyright (c) 1980, 1989, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
19 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .\" @(#)fstab.5 6.5 (Berkeley) 5/10/91
33 .\"
34 .\" Modified Sat Mar 6 20:45:03 1993, faith@cs.unc.edu, for Linux
35 .\" Sat Oct 9 10:07:10 1993: converted to man format by faith@cs.unc.edu
36 .\" Sat Nov 20 20:47:38 1993: hpfs documentation added
37 .\" Sat Nov 27 20:23:32 1993: Updated authorship information
38 .\" Wed Jul 26 00:00:00 1995: Updated some nfs stuff, joey@infodrom.north.de
39 .\"
40 .TH FSTAB 5 "27 November 1993" "Linux 0.99" "Linux Programmer's Manual"
41 .SH NAME
42 fstab \- static information about the filesystems
43 .SH SYNOPSIS
44 .B #include <fstab.h>
45 .SH DESCRIPTION
46 The file
47 .B fstab
48 contains descriptive information about the various file systems.
49 .B fstab
50 is only read by programs, and not written; it is the duty of the system
51 administrator to properly create and maintain this file. Each filesystem
52 is described on a separate line; fields on each line are separated by tabs
53 or spaces. The order of records in
54 .B fstab
55 is important because
56 .BR fsck "(8), " mount "(8), and " umount "(8)
57 sequentially iterate through
58 .B fstab
59 doing their thing.
60
61 The first field,
62 .RI ( fs_spec ),
63 describes the block special device or
64 remote filesystem to be mounted.
65
66 The second field,
67 .RI ( fs_file ),
68 describes the mount point for the filesystem. For swap partitions, this
69 field should be specified as ``none''.
70
71 The third field,
72 .RI ( fs_vfstype ),
73 describes the type of the filesystem. The system currently supports three
74 types of filesystems:
75 .TP
76 .I minix
77 a local filesystem, supporting filenames of length 14 or 30 characters.
78 .TP
79 .I ext
80 a local filesystem with longer filenames and larger inodes. This
81 filesystem has been replaced by the
82 .I ext2
83 file system, and should no longer be used.
84 .TP
85 .I ext2
86 a local filesystem with longer filenames, larger inodes, and lots of other
87 features.
88 .TP
89 .I xiafs
90 a local filesystem with longer filenames, larger inodes, and lots of other
91 features.
92 .TP
93 .I msdos
94 a local filesystem for MS-DOS partitions.
95 .TP
96 .I hpfs
97 a local filesystem for HPFS partitions.
98 .TP
99 .I iso9660
100 a local filesystem used for CD-ROM drives.
101 .TP
102 .I nfs
103 a filesystem for mounting partitions from remote systems.
104 .TP
105 .I swap
106 a disk partition to be used for swapping.
107 .PP
108 If
109 .I vfs_fstype
110 is specified as ``ignore'' the entry is ignored. This is useful to show
111 disk partitions which are currently unused.
112
113 The fourth field,
114 .RI ( fs_mntops ),
115 describes the mount options associated with the filesystem.
116
117 It is formatted as a comma separated list of options. It contains at least
118 the type of mount plus any additional options appropriate to the filesystem
119 type. For documentation on the available options for non-nfs file systems,
120 see
121 .BR mount (8).
122 For documentation on all nfs-specific options have a look at
123 .BR nfs (5).
124
125 The fifth field,
126 .RI ( fs_freq ),
127 is used for these filesystems by the
128 .BR dump (8)
129 command to determine which filesystems need to be dumped. If the fifth
130 field is not present, a value of zero is returned and
131 .B dump
132 will assume that the filesystem does not need to be dumped.
133
134 The sixth field,
135 .RI ( fs_passno ),
136 is used by the
137 .BR fsck (8)
138 program to determine the order in which filesystem checks are done at
139 reboot time. The root filesystem should be specified with a
140 .I fs_passno
141 of 1, and other filesystems should have a
142 .I fs_passno
143 of 2. Filesystems within a drive will be checked sequentially, but
144 filesystems on different drives will be checked at the same time to utilize
145 parallelism available in the hardware. If the sixth field is not present
146 or zero, a value of zero is returned and
147 .B fsck
148 will assume that the filesystem does not need to be checked.
149
150 The proper way to read records from
151 .B fstab
152 is to use the routines
153 .BR getmntent (3).
154 .SH FILES
155 .I /etc/fstab
156 The file
157 .B fstab
158 resides in
159 .IR /etc .
160 .SH BUGS
161 The documentation in
162 .BR mount (8)
163 is often more up-to-date.
164 .SH "SEE ALSO"
165 .BR getmntent "(3), " mount "(8), " swapon "(8), " nfs (5)
166 .SH HISTORY
167 The
168 .B fstab
169 file format appeared in 4.0BSD.