specialFile    directory   fstype   mntops   freq   passno

Contains descriptive information about file systems.
Read by programs, not written.
The system administrator manually maintains this file.

specialFile block special device or the remote filesystem to be mounted.
directory mount point for the filesystem.
fstype type of the filesystem including special:
ufs local UNIX
msdos DOS compatible
nfs Sun Microsystems compatible Network File System
cd9660  CD-ROM (as per ISO 9660)
swap partition for swapping
tmpfs temporary ( may be cleaned at boot)
procfs for accessing process data
kernfs for accessing kernel parameters
fdesc /dev/fd
union translucent
mntops mount options: a comma separated list containing the type of mount plus additional options
auto | noauto file system is | isn't mounted automatically with mount -a, or system boot time.
rw or ro the filesystem is normally mounted read-write or read-only.
sw swap space. freq and passno are unused.
xx the entry is ignored. useful to show disk partitions which are currently unused.
The type of the mount is extracted from the mntops field and stored separately in the fstype (it is not deleted from the mntops field).
freq used by dump If not present FS will not be dumped.
passno the order fsck processes filesystems at boot time
1 should be used for the root filesystem
2 for other filesystems .
0 or not present: skip.

Filesystems within a drive will be checked sequentially,
Filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware.

The order of records in fstab is important because diskarbitrationd(8), fsck(8), mount(8), and umount(8) process /etc/fstab sequentially.

The proc file system is not associated with a special device. An arbitrary keyword, such as proc is used instead of a device specification. (The customary choice none causes the confusing error message none busy from umount -a)


/dev/sda2        /          ext3    defaults,usrquota        1 1
/dev/sda1        /boot      ext3    defaults                 1 2
/dev/sda4        /home      ext3    defaults                 1 2
/dev/sda3        swap       swap    defaults                
none             /tmp       tmpfs   nodev,nosuid,noexec      
none             /var/tmp   tmpfs   nodev,nosuid,noexec      
SunDBsys:DBFiles /dbdata    nfs
none             /proc      proc    defaults               
none             /dev/pts   devpts  gid=5,mode=620        


     #define FSTAB_RW  "rw"    /* read-write */
     #define FSTAB_RO  "ro"    /* read-only */
     #define FSTAB_SW  "sw"    /* swap */
     #define FSTAB_XX  "xx"    /* ignore totally */

     struct fstab {
             char    *fs_spec;       /* block special device name */
             char    *fs_file;       /* filesystem path prefix */
             char    *fs_vfstype;    /* type of filesystem */
             char    *fs_mntops;     /* comma separated mount options */
             char    *fs_type;       /* rw, ro, sw, or xx */
             int     fs_freq;        /* dump frequency, in days */
             int     fs_passno;      /* pass number on parallel fsck */
To read records from fstab use getfsent(3), getfsspec(3), getfstype(3), and getfsfile(3).

diskarbitrationd supports the identification of a local filesystem uniquely by its UUID or by its volume name, irrespective of hardware configuration and of hardware parallelism, using the keywords UUID and LABEL.


      UUID=DF000C7E-AE0C-3B15-B730-DFD2EF15CB91     /export   ufs   ro
      UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA      none     hfs   rw,noauto
      LABEL=DBDATA                                   none     ntfs  rw
      LABEL=The\040Volume\040Name\040Is\040This      none     msdos ro

See : getfsent(3), diskarbitrationd(8), /etc/mtab, /etc/filesystem

BSD File Formats Manual FSTAB(5) March 28, 2002 Darwin