4.3BSD-UWisc/man/cat5/fstab.5

Compare this file to the similar file:
Show the results in this format:




FSTAB(5)            UNIX Programmer's Manual             FSTAB(5)



NAME
     fstab - static information about filesystems

SYNOPSIS
     #include <mntent.h>

DESCRIPTION
     The file /_e_t_c/_f_s_t_a_b describes the filesystems and swapping
     partitions used by the local machine.  The system adminis-
     trator can modify it with a text editor.  It is read by com-
     mands that mount, unmount, dump, restore, and check the con-
     sistency of filesystems; also by the system when providing
     swap space.  The file consists of a number of lines of the
     form:
9          _f_s_n_a_m_e _d_i_r _t_y_p_e _o_p_t_s _f_r_e_q _p_a_s_s_n_o
9     for example:
9          /dev/xy0a / 4.2 rw,noquota 1 2
9
     The entries from this file are accessed using the routines
     in _g_e_t_m_n_t_e_n_t(3), which returns a structure of the following
     form:

          struct mntent {
                 char  *mnt_fsname;  /* filesystem name */
                 char  *mnt_dir;     /* filesystem path prefix */
                 char  *mnt_type;    /* 4.2, nfs, swap, or ignore */
                 char  *mnt_opts;    /* rw, ro, noquota, quota, hard, soft */
                 int   mnt_freq;     /* dump frequency, in days */
                 int   mnt_passno;   /* pass number on parallel fsck */
          };

     Fields are separated by white space; a `#' as the first
     non-white character indicates a comment.

     The _m_n_t__d_i_r fields is the full path name of the directory to
     be mounted on.

     The _m_n_t__t_y_p_e field determines how the _m_n_t__f_s_n_a_m_e and
     _m_n_t__o_p_t_s fields will be interpreted.  Here is a list of the
     filesystem types currently supported, and the way each of
     them interprets these fields:

     4.2       _m_n_t__f_s_n_a_m_e  Must be a block special device.

     nfs       _m_n_t__f_s_n_a_m_e  the path on the server of the direc-
               tory to be served.

     swap      _m_n_t__f_s_n_a_m_e  must be a block special device swap
               partition.




Printed 12/27/86        23 September 1985                       1






FSTAB(5)            UNIX Programmer's Manual             FSTAB(5)



     If the _m_n_t__t_y_p_e is specified as ignore then the entry is
     ignored.  This is useful to show disk partitions not
     currently used.

     The _m_n_t__o_p_t_s field contains a list of comma-separated option
     words.  Some _m_n_t__o_p_t_s are valid for all filesystem types,
     while others apply to a specific type only:
9
          _m_n_t__o_p_t_s valid on _a_l_l file systems (the default is
          rw,suid):

          rw     read/write.

          ro     read-only.

          suid   set-uid execution allowed.

          nosuid set-uid execution not allowed.
9
          _m_n_t__o_p_t_s specific to 4.2 file systems (the default is
          noquota).

          quota  usage limits enforced.

          noquotausage limits not enforced.
9
          _m_n_t__o_p_t_s specific to nfs (NFS) file systems (the
          defaults are:
9               fg,retry=1,timeo=7,retrans=4,port=NFS_PORT,hard
9          with defaults for _r_s_i_z_e and _w_s_i_z_e set by the kernel):

          bg        if the first attempt fails, retry in the
                    background.

          fg        retry in foreground.

          retry=_n   set number of failure retries to _n.

          rsize=_n   set read buffer size to _n bytes.

          wsize=_n   set write buffer size to _n _b_y_t_e_s.

          timeo=_n   set NFS timeout to _n tenths of a second.

          retrans=_n set number of NFS retransmissions to _n.

          port=_n    set server IP port number to _n.

          soft      return error if server doesn't respond.
9


Printed 12/27/86        23 September 1985                       2






FSTAB(5)            UNIX Programmer's Manual             FSTAB(5)



          hard      retry request until server responds.

          The bg option causes _m_o_u_n_t to run in the background if
          the server's _m_o_u_n_t_d(8) does not respond. _m_o_u_n_t attempts
          each request retry=_n times before giving up.  Once the
          filesystem is mounted, each nfs request made in the
          kernel waits timeo=_n tenths of a second for a response.
          If no response arrives, the time-out is multiplied by 2
          and the request is retransmitted.  When retrans=_n
          retransmissions have been sent with no reply a soft
          mounted filesystem returns an error on the request and
          a hard mounted filesystem retries the request.  The
          number of bytes in a read or write request can be set
          with the rsize and wsize options.

     The field _m_n_t__f_r_e_q indicates how often each partition should
     be dumped by the _d_u_m_p(8) command (and triggers that
     command's w option, which determines what filesystems should
     be dumped).  Most systems set the _m_n_t__f_r_e_q field to 1, indi-
     cating that filesystems are dumped each day.

     The final field, _m_n_t__p_a_s_s_n_o, is used by the consistency
     checking program _f_s_c_k(8) to allow overlapped checking of
     filesystems during a reboot.  All filesystems with
     _m_n_t__p_a_s_s_n_o of 1 are checked first simultaneously, then all
     filesystems with _m_n_t__p_a_s_s_n_o of 2, and so on.  It is usual to
     make the _m_n_t__p_a_s_s_n_o of the root filesystem have the value 1,
     and then check one filesystem on each available disk drive
     in each subsequent pass, until all filesystem partitions are
     checked.

     The /_e_t_c/_f_s_t_a_b file is read only by programs and never writ-
     ten; the system administrator must maintain it manually.
     The order of records in /_e_t_c/_f_s_t_a_b is important because
     _f_s_c_k, _m_o_u_n_t, and _u_m_o_u_n_t process the file sequentially;
     filesystems must appear _a_f_t_e_r filesystems they are mounted
     within.

FILES
     /etc/fstab

SEE ALSO
     getmntent(3), fsck(8), mount(8), quotacheck(8), quotaon(8)












Printed 12/27/86        23 September 1985                       3