]> git.ipfire.org Git - thirdparty/util-linux.git/blob - mount/fstab.5
Imported from util-linux-2.11o 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 .\" Tue Apr 2 00:38:28 1996: added info about "noauto", "user", etc.
40 .\" Tue Jun 15 20:02:18 1999: added LABEL and UUID
41 .\"
42 .TH FSTAB 5 "15 June 1999" "Linux 2.2" "Linux Programmer's Manual"
43 .SH NAME
44 fstab \- static information about the filesystems
45 .SH SYNOPSIS
46 .B #include <fstab.h>
47 .SH DESCRIPTION
48 The file
49 .B fstab
50 contains descriptive information about the various file systems.
51 .B fstab
52 is only read by programs, and not written; it is the duty of the system
53 administrator to properly create and maintain this file. Each filesystem
54 is described on a separate line; fields on each line are separated by tabs
55 or spaces. Lines starting with '#' are comments. The order of records in
56 .B fstab
57 is important because
58 .BR fsck (8),
59 .BR mount (8),
60 and
61 .BR umount (8)
62 sequentially iterate through
63 .B fstab
64 doing their thing.
65
66 The first field,
67 .RI ( fs_spec ),
68 describes the block special device or
69 remote filesystem to be mounted.
70 .LP
71 For ordinary mounts it will hold (a link to) a block special
72 device node (as created by
73 .BR mknod (8))
74 for the device to be mounted, like `/dev/cdrom' or `/dev/sdb7'.
75 For NFS mounts one will have <host>:<dir>, e.g., `knuth.aeb.nl:/'.
76 For procfs, use `proc'.
77 .LP
78 Instead of giving the device explicitly, one may indicate
79 the (ext2 or xfs) filesystem that is to be mounted by its UUID or
80 volume label (cf.
81 .BR e2label (8)
82 or
83 .BR xfs_admin (8)),
84 writing LABEL=<label> or UUID=<uuid>,
85 e.g., `LABEL=Boot' or `UUID=3e6be9de\%-8139\%-11d1\%-9106\%-a43f08d823a6'.
86 This will make the system more robust: adding or removing a SCSI disk
87 changes the disk device name but not the filesystem volume label.
88
89 The second field,
90 .RI ( fs_file ),
91 describes the mount point for the filesystem. For swap partitions, this
92 field should be specified as `none'. If the name of the mount point
93 contains spaces these can be escaped as `\\040'.
94
95 The third field,
96 .RI ( fs_vfstype ),
97 describes the type of the filesystem. Linux supports lots
98 of filesystem types, such as
99 .IR adfs ,
100 .IR affs ,
101 .IR autofs ,
102 .IR coda ,
103 .IR coherent ,
104 .IR cramfs ,
105 .IR devpts ,
106 .IR efs ,
107 .IR ext2 ,
108 .IR ext3 ,
109 .IR hfs ,
110 .IR hpfs ,
111 .IR iso9660 ,
112 .IR jfs ,
113 .IR minix ,
114 .IR msdos ,
115 .IR ncpfs ,
116 .IR nfs ,
117 .IR ntfs ,
118 .IR proc ,
119 .IR qnx4 ,
120 .IR reiserfs ,
121 .IR romfs ,
122 .IR smbfs ,
123 .IR sysv ,
124 .IR tmpfs ,
125 .IR udf ,
126 .IR ufs ,
127 .IR umsdos ,
128 .IR vfat ,
129 .IR xenix ,
130 .IR xfs ,
131 and possibly others. For more details, see
132 .BR mount (8).
133 For the filesystems currently supported by the running kernel, see
134 .IR /proc/filesystems .
135 An entry
136 .I swap
137 denotes a file or partition to be used
138 for swapping, cf.\&
139 .BR swapon (8).
140 An entry
141 .I ignore
142 causes the line to be ignored. This is useful
143 to show disk partitions which are currently unused.
144
145 The fourth field,
146 .RI ( fs_mntops ),
147 describes the mount options associated with the filesystem.
148
149 It is formatted as a comma separated list of options. It contains at least
150 the type of mount plus any additional options appropriate to the filesystem
151 type. For documentation on the available options for non-nfs file systems,
152 see
153 .BR mount (8).
154 For documentation on all nfs-specific options have a look at
155 .BR nfs (5).
156 Common for all types of file system are the options ``noauto''
157 (do not mount when "mount -a" is given, e.g., at boot time), ``user''
158 (allow a user to mount), and ``owner''
159 (allow device owner to mount). For more details, see
160 .BR mount (8).
161
162 The fifth field,
163 .RI ( fs_freq ),
164 is used for these filesystems by the
165 .BR dump (8)
166 command to determine which filesystems need to be dumped. If the fifth
167 field is not present, a value of zero is returned and
168 .B dump
169 will assume that the filesystem does not need to be dumped.
170
171 The sixth field,
172 .RI ( fs_passno ),
173 is used by the
174 .BR fsck (8)
175 program to determine the order in which filesystem checks are done at
176 reboot time. The root filesystem should be specified with a
177 .I fs_passno
178 of 1, and other filesystems should have a
179 .I fs_passno
180 of 2. Filesystems within a drive will be checked sequentially, but
181 filesystems on different drives will be checked at the same time to utilize
182 parallelism available in the hardware. If the sixth field is not present
183 or zero, a value of zero is returned and
184 .B fsck
185 will assume that the filesystem does not need to be checked.
186
187 The proper way to read records from
188 .B fstab
189 is to use the routines
190 .BR getmntent (3).
191 .SH FILES
192 .I /etc/fstab
193 .SH "SEE ALSO"
194 .BR getmntent (3),
195 .BR mount (8),
196 .BR swapon (8),
197 .BR fs (5)
198 .BR nfs (5)
199 .SH HISTORY
200 The ancestor of this
201 .B fstab
202 file format appeared in 4.0BSD.
203 .\" But without comment convention, and options and vfs_type.
204 .\" Instead there was a type rw/ro/rq/sw/xx, where xx is the present 'ignore'.