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