1FSTAB(5)                   Linux Programmer's Manual                  FSTAB(5)
2
3
4

NAME

6       fstab - static information about the filesystems
7

SYNOPSIS

9       #include <fstab.h>
10

DESCRIPTION

12       The  file fstab contains descriptive information about the various file
13       systems.  It is the duty of the system administrator to properly create
14       and  maintain  this file.  fstab can be modified by special utils (e.g.
15       fstab-sync(8)).  Each filesystem  is  described  on  a  separate  line;
16       fields  on  each  line are separated by tabs or spaces.  Lines starting
17       with '#' are comments.  The order of  records  in  fstab  is  important
18       because  fsck(8),  mount(8), and umount(8) sequentially iterate through
19       fstab doing their thing.
20
21       The first field, (fs_spec),  describes  the  block  special  device  or
22       remote filesystem to be mounted.
23
24       For  ordinary  mounts  it  will hold (a link to) a block special device
25       node (as created by mknod(8))  for  the  device  to  be  mounted,  like
26       `/dev/cdrom'   or   `/dev/sdb7'.    For   NFS   mounts  one  will  have
27       <host>:<dir>, e.g., `knuth.aeb.nl:/'.  For procfs, use `proc'.
28
29       Instead of giving the device explicitly, one may indicate the (ext2  or
30       xfs)  filesystem that is to be mounted by its UUID or volume label (cf.
31       e2label(8) or  xfs_admin(8)),  writing  LABEL=<label>  or  UUID=<uuid>,
32       e.g.,   `LABEL=Boot'   or  `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.
33       This will make the system more robust: adding or removing a  SCSI  disk
34       changes the disk device name but not the filesystem volume label.
35
36       The second field, (fs_file), describes the mount point for the filesys‐
37       tem.  For swap partitions, this field should be specified as `none'. If
38       the  name  of  the  mount point contains spaces these can be escaped as
39       `\040'.
40
41       The third field, (fs_vfstype), describes the type  of  the  filesystem.
42       Linux  supports  lots  of filesystem types, such as adfs, affs, autofs,
43       coda, coherent, cramfs, devpts, efs, ext2, ext3,  hfs,  hpfs,  iso9660,
44       jfs,  minix,  msdos,  ncpfs,  nfs,  ntfs,  proc, qnx4, reiserfs, romfs,
45       smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix,  xfs,  and  possibly
46       others.  For more details, see mount(8).  For the filesystems currently
47       supported by the running kernel, see /proc/filesystems.  An entry  swap
48       denotes a file or partition to be used for swapping, cf. swapon(8).  An
49       entry ignore causes the line to be ignored.  This  is  useful  to  show
50       disk partitions which are currently unused.
51
52       The  fourth  field, (fs_mntops), describes the mount options associated
53       with the filesystem.
54
55       It is formatted as a comma separated list of options.  It  contains  at
56       least  the type of mount plus any additional options appropriate to the
57       filesystem type.  For documentation on the available options  for  non-
58       nfs  file systems, see mount(8).  For documentation on all nfs-specific
59       options have a look at nfs(5).  Common for all types of file system are
60       the options ``noauto'' (do not mount when "mount -a" is given, e.g., at
61       boot time), ``user'' (allow a user to mount), ``owner''  (allow  device
62       owner to mount), ``pamconsole'' (allow a user at the console to mount),
63       and ``comment'' (e.g., for use  by  fstab-maintaining  programs).   The
64       ``owner'',  ``pamconsole''  and ``comment'' options are Linux-specific.
65       For more details, see mount(8).
66
67       The fifth field, (fs_freq),  is  used  for  these  filesystems  by  the
68       dump(8)  command  to determine which filesystems need to be dumped.  If
69       the fifth field is not present, a value of zero is  returned  and  dump
70       will assume that the filesystem does not need to be dumped.
71
72       The  sixth field, (fs_passno), is used by the fsck(8) program to deter‐
73       mine the order in which filesystem checks are done at reboot time.  The
74       root  filesystem  should  be specified with a fs_passno of 1, and other
75       filesystems should have a fs_passno of 2.  Filesystems within  a  drive
76       will  be checked sequentially, but filesystems on different drives will
77       be checked at the same time to utilize  parallelism  available  in  the
78       hardware.   If  the sixth field is not present or zero, a value of zero
79       is returned and fsck will assume that the filesystem does not  need  to
80       be checked.
81
82       The proper way to read records from fstab is to use the routines getmn‐
83       tent(3).
84

FILES

86       /etc/fstab
87

SEE ALSO

89       getmntent(3), mount(8), swapon(8), fs(5) nfs(5) fstab-sync(8)
90

HISTORY

92       The ancestor of this fstab file format appeared in 4.0BSD.
93
94
95
96Linux 2.2                        15 June 1999                         FSTAB(5)
Impressum