blob: e276350c26c506795d0a892acfd098accadb7464 [file] [log] [blame]
.\" Copyright (c) 1980, 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)fstab.5 6.5 (Berkeley) 5/10/91
.\"
.\" Modified Sat Mar 6 20:45:03 1993, faith@cs.unc.edu, for Linux
.\" Sat Oct 9 10:07:10 1993: converted to man format by faith@cs.unc.edu
.\" Sat Nov 20 20:47:38 1993: hpfs documentation added
.\" Sat Nov 27 20:23:32 1993: Updated authorship information
.\" Wed Jul 26 00:00:00 1995: Updated some nfs stuff, joey@infodrom.north.de
.\"
.TH FSTAB 5 "27 November 1993" "Linux 0.99" "Linux Programmer's Manual"
.SH NAME
fstab \- static information about the filesystems
.SH SYNOPSIS
.B #include <fstab.h>
.SH DESCRIPTION
The file
.B fstab
contains descriptive information about the various file systems.
.B fstab
is only read by programs, and not written; it is the duty of the system
administrator to properly create and maintain this file. Each filesystem
is described on a separate line; fields on each line are separated by tabs
or spaces. The order of records in
.B fstab
is important because
.BR fsck "(8), " mount "(8), and " umount "(8)
sequentially iterate through
.B fstab
doing their thing.
The first field,
.RI ( fs_spec ),
describes the block special device or
remote filesystem to be mounted.
The second field,
.RI ( fs_file ),
describes the mount point for the filesystem. For swap partitions, this
field should be specified as ``none''.
The third field,
.RI ( fs_vfstype ),
describes the type of the filesystem. The system currently supports these
types of filesystems (and possibly others - consult
.IR /proc/filesystems ):
.TP
.I minix
a local filesystem, supporting filenames of length 14 or 30 characters.
.TP
.I ext
a local filesystem with longer filenames and larger inodes. This
filesystem has been replaced by the
.I ext2
file system, and should no longer be used.
.TP
.I ext2
a local filesystem with longer filenames, larger inodes, and lots of other
features.
.TP
.I xiafs
a local filesystem with longer filenames, larger inodes, and lots of other
features.
.TP
.I msdos
a local filesystem for MS-DOS partitions.
.TP
.I hpfs
a local filesystem for HPFS partitions.
.TP
.I iso9660
a local filesystem used for CD-ROM drives.
.TP
.I nfs
a filesystem for mounting partitions from remote systems.
.TP
.I swap
a disk partition to be used for swapping.
.PP
If
.I vfs_fstype
is specified as ``ignore'' the entry is ignored. This is useful to show
disk partitions which are currently unused.
The fourth field,
.RI ( fs_mntops ),
describes the mount options associated with the filesystem.
It is formatted as a comma separated list of options. It contains at least
the type of mount plus any additional options appropriate to the filesystem
type. For documentation on the available options for non-nfs file systems,
see
.BR mount (8).
For documentation on all nfs-specific options have a look at
.BR nfs (5).
The fifth field,
.RI ( fs_freq ),
is used for these filesystems by the
.BR dump (8)
command to determine which filesystems need to be dumped. If the fifth
field is not present, a value of zero is returned and
.B dump
will assume that the filesystem does not need to be dumped.
The sixth field,
.RI ( fs_passno ),
is used by the
.BR fsck (8)
program to determine the order in which filesystem checks are done at
reboot time. The root filesystem should be specified with a
.I fs_passno
of 1, and other filesystems should have a
.I fs_passno
of 2. Filesystems within a drive will be checked sequentially, but
filesystems on different drives will be checked at the same time to utilize
parallelism available in the hardware. If the sixth field is not present
or zero, a value of zero is returned and
.B fsck
will assume that the filesystem does not need to be checked.
The proper way to read records from
.B fstab
is to use the routines
.BR getmntent (3).
.SH FILES
.I /etc/fstab
The file
.B fstab
resides in
.IR /etc .
.SH BUGS
The documentation in
.BR mount (8)
is often more up-to-date.
.SH "SEE ALSO"
.BR getmntent "(3), " mount "(8), " swapon "(8), " nfs (5)
.SH HISTORY
The
.B fstab
file format appeared in 4.0BSD.